Move Index Location for JIRA

Marc Carr August 14, 2014

Is there a way to move the index to a new location without migrating or updating database tables? We want to test out faster SSD's but only want to move the index not the whole partition that JIRA is installed on. It looks like you used to be able to set a custon index location back in 4.1

Thanks!

1 answer

1 accepted

0 votes
Answer accepted
Alexey_Rjeutski__Polontech_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 14, 2014

What operation system do you use? if that is linux - move caches folder that is inside jira home directory to the new place and place symlink on it. Well, for windows the same)

Refer to

http://lifehacker.com/5496652/how-to-use-symlinks-in-windows

http://lifehacker.com/5270634/move-files-without-breaking-stuff

Marc Carr August 14, 2014

We run Windows server 2008 R2. If we used symlinks would we actually see an increase in performance moving to SSD's? If its just a shortcut to the slower folder/drives? Maybe I'm confused how symlinks work and I'm surprised Atlassian doesn't have a recommended solution for moving indexes. Thanks for the responses!

Alexey_Rjeutski__Polontech_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 14, 2014

i.e.:

you have 2 drives, drive C (slow), drive D (fast)

On drive C you have installed jira with jira data folder in c:\jiradata

Indexes are located at c:\jiradata\caches

You move that caches folder from c:\jiradata\caches to d:\caches and create a symlink at drive C inside c:\jiradata folder that will point to d:\caches

Now every time jira tries to open file at c:\jiradata\caches\... it is automaticaly non-transporently redirrected to drive d:\caches and file is actually opened from the new fast drive. So you actually execute read-write operations with that new drive.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 14, 2014

Some points

1. You MUST have Jira offline when you do this move and link, or you could partly trash your index

2. Shortcuts will NOT hack it, the drive MUST be mounted and linked into the right place. (Users of superior file systems have access to easy symbolic links, soft and hard, and can even mount drives in the right place, it's an absolute doddle. But if you're stuck with Windows, you'll have to use the less-than-ideal way that MS have implemented "symbolic links" 20 years later than everyone else). I'd strongly recommend the use of "mklink" on the command line, rather than using the GUI - I've had problems with symbolic links disappearing and users creating shortcuts instead of links when they use the GUI. mklink forces the issue.

3. Copying the index files like this almost always works fine. But if you do get errors, then a full re-index will fix it fine. You could even skip the copy - just create the links, restart Jira and re-index

Marc Carr August 14, 2014

I tried using MKLINK /H but I'm getting an error "system cannot move the file to a different disk drive". Can you only use MKLINK between partitions? or on 1 file system? thanks!

Alexey_Rjeutski__Polontech_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 14, 2014

Please see http://technet.microsoft.com/en-us/library/cc753194.aspxfor details

Please also note that hardlink can exist only inside the same volume, please see http://msdn.microsoft.com/en-us/library/windows/desktop/aa365006(v=vs.85).aspx

You need a symlink for directory or junction(soft directory link)

Suggest an answer

Log in or Sign up to answer