how to copy the current JIRA onto a new server.

Harish May 22, 2013

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

0 votes
richie_gee
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 22, 2013

Hi Harish,

You might want to check out the following documentation:

https://confluence.atlassian.com/display/JIRA044/Migrating+JIRA+to+Another+Server

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

0 votes
William van Beek May 22, 2013

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 = 'https://jira-staging.DOMAIN.org' 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 setenv.sh
  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.

William

0 votes
Harish May 22, 2013

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

0 votes
Zul NS _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 22, 2013

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?

0 votes
Christian Czaia _Decadis AG_
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 22, 2013

We'Re doing it via database dump...

Suggest an answer

Log in or Sign up to answer