Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Move Jira application data dir

steven_flowers3 April 9, 2018

We would like to move our application data from /var/atlassian to /opt/atlassian (new LVM mount).

 

Can someone provide information on how to do this? I assume I cannot simply copy the directory.

 

Thanks in advance for any help.

1 answer

2 votes
Nic Brough -Adaptavist-
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.
April 9, 2018

Actually, you almost can "just copy it".

Stop Jira and make the copy.  Make sure you retain (or recreate) all permissions and ownership when you copy.

Go to the Jira installation and find /atlassian-jira/WEB-INF/classes/jira-application.properties  - edit that and change the home directory line (it's likely to be the only one in there).  If it is blank though, leave it alone, and go instead to /bin/ and go through all the .sh files to look for where the home directory is set.

Restart Jira.  Check the system information page to ensure it's got the new path.  You don't even need to re-index.

steven_flowers3 April 9, 2018

Thanks very much! I will test this tonight.

steven_flowers3 April 9, 2018

I broke the permissions....

 

Are you aware of any documentation to restore the permissions? The app won't start and all permissions show as root:root with 750 ACL.

 

Edit:

I had to set permissions to jira:root 770 to get it to start...Doesn't feel good

Nic Brough -Adaptavist-
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.
April 10, 2018

No, you're right, we shouldn't run Jira as root.

The original install usually tries to create a new dedicated user for running Jira with, and that user should own all the installation and data files, as well as running Jira.  (There's a mix of permissions on my systems but 750 for all the data should work fine with the dedicated user as the owner)

Do you have such a user?  How do you normally start Jira?

steven_flowers3 April 10, 2018

There is a Jira user. I normally start Jira using init scripts (/etc/init.d/jira start).

 

I didn't install this application just managing it now.

jcraig November 25, 2019

Will this approach also work for moving the BitBucket application directory?

Nic Brough -Adaptavist-
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 27, 2019

I am not 100% sure, but it should.  The config files to change are different though, and I can't remember which ones off the top of my head

Like jcraig likes this
jcraig December 2, 2019

Looks like BitBucket has an environment variable, BITBUCKET_HOME, which can be set in the file 

<atlassian-install-dir>/bitbucket/6.7.1/bin/set-bitbucket-home.sh

Or .bat for Windows. Of course, I'm using version 6.7.1, so a different version might have a different solution. Thanks for the tip.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events