Change Jira index path back to custom location

Cyril Egan
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.
November 12, 2012

We had our Jira 5.1.6 instance configured to use a customised path for our indexes. It was set to a path of /ramdisk_mount/lucene

A new user with Jira system administrator access who was looking around the administration interface clicked the radio button for "Use Default Directory" and pressed the "Re-Index" button.

We know we can't change back via the UI to /ramdisk_mount/lucene

Can we change back by the following steps or something similar?

1. Shutdown Jira

2. Update a record in the database (we use MySQL 5.x) to set the custom path for indexes (I would need instruction on tables etc)

3. Copy the index files from the new location to the old location

4. Start Jira

3 answers

2 votes
Faisal
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.
November 12, 2012

Hi Cyril,

After choosing the default directory for index path, I am afraid that we are no longer able to switch the index directory to use custom path again. This information is outlined in the following documentation:
- https://confluence.atlassian.com/display/JIRA051/Search+Indexing

(info) Choosing a custom Index Path:

  • If you upgraded JIRA with anXML backupfrom a JIRA version prior to 4.2 and used a custom directory for your index path, you can choose between using this custom directory (which cannot be edited) or the default directory for your index path location. However, once you switch to using the default directory, you can no longer choose the custom directory option.

Therefore, I may confirm that it's not possible for us to use the custom path from JIRA UI.

As for updating the records in database, supposedly the index path information are stored in the propertyentry, and propertystring table. However, I am unable to confirm if updating the record will work, since I was unable to change the attachment path directly from the database. There's a KB article written to change the attachment path, but it seemed not be working for me, hence I couldn't confirm the same for index path:
https://confluence.atlassian.com/display/JIRAKB/Changing+The+Attachments+Directory+in+JIRA+4.2+to+JIRA+4.4

Another alternative for us here is to use symlink instead, to link the $JIRA_HOME/caches directory to /ramdisk_mount/lucene.

Though it's not much, but I hope that the info above helps.

Cheers.

1 vote
DJX
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.
May 13, 2014
select * from propertyentry where propertyentry.PROPERTY_KEY like '%index%'

this will get you the property IDs of the indexing attributes, specifically the jira.option.indexing (make sure this is set to 1) and also jira.path.index.

You can then update the propertynumber and propertystring tables respectively with the value you want.

This is the method I had to use when migrating to another server and the indexing location changed.

0 votes
Heshan Manamperi
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.
March 27, 2013

Hi Cyril,

I also want to change the location of index directory? So is it enough to change this location in db? If so what are the db tables should I change?

Thanks in advance,

Hesh

Suggest an answer

Log in or Sign up to answer