It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Move Jira application data dir

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

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.

Thanks very much! I will test this tonight.

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

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?

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.

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

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

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

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you