how to copy the current JIRA onto a new server.

Hi.. i am trying to install JIRA ( 4.5 version ) on a new server. the default settings are working fine. Now i want to copy the data from an already existing server to this new server so that both the installations are in sync. But, when i copy the xml file to the new system it is now working and most of the cunfigurations are getting changed which should not happen.

Please advise how i can copy the projects, issues and schemas wihout affecting the certificates.

5 answers

We'Re doing it via database dump...

0 votes

Christian is correct, database dump would work in this case as well. However, I'm a bit confuse on what do you mean by certificates? Did you configure SSL or any other external configuration outside JIRA directories by any chance?

we have a user directory to read from the LDAP server. but after importing the new xml the connection to the LDAP server fails and doesnt allow users to login.

also the email settings are getting overwritten by the new file

Hi There,

What we do to copy the live to our staging, is a database dump to a new database also, we copy the home and installation dir to the exact same directory on the other server so no config files have to be adapted (apache ed.), further more you might want to change the base-url from your jira installation in the database like:

"UPDATE propertystring SET propertyvalue = '' WHERE ID=(SELECT ID from propertyentry WHERE PROPERTY_KEY = 'jira.baseUrl')"

then check if it is changed with:

"select * from propertystring WHERE id=10012;"

in over all in this script i made i do the following:

  1. kill the last copy, by simply killing java (killall -9 java)
  2. delete data (rm-rf /jira/) (the staging server not the live one ;) )
  3. check if you got the ssh key to connect to your live server with no password (if not copy it first, then rerun the script)
  4. then scp the files, scp -r -i /key_dsa ip:/jira/live/location /jira/staging 1>/dev/null
  5. remove old logs (rm -rf /jira/home/data/log) (again on the staging machine)
  6. after this we dont want the staging to use the same database as the live one so we copy adapted scripts to thier location you need: dbconfig.xml and
  7. now its time for the dump! : ( mysqldump --host=IPADRESS --user=staging-jira --password=VERYSECUREISNTIT? LIVE_DB | mysql --host=IPADRESS --user=staging-jira --password=VERYSECUREISNTIT? STAGING_DB )
  8. change base url see code up in this post
  9. check base url also above
  10. start jira

remember to create a new db user that can only lock and copy the live database and does not have write acces! and to change the files that you copy back so your staging wont use the live database.

after this you should be good to go i would say :)

a handy note in this is that we have 2 identical servers in our own cloud with the same base immage so we dont need to isntall / reconfigure apache or java or other software.


0 votes
Richie Gee Atlassian Team May 22, 2013

Hi Harish,

You might want to check out the following documentation:

It covers the major concern of yours, following the steps should get things working in no time :)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,495 views 15 20
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you