JIRA 4.4.3 Migration AND Upgrade to JIRA 5.

Rolando April 13, 2012

Hello All,

I'm not sure what is the best practice here, but i'm looking to move our jira instance over to another server, as well as upgrade from 4.4.3 => 5. The Atlassian Docs don't seem to cater for this situation, if you look at the documetation for upgrading it suggests you do a migration, and if you look at the migration doc it says you should look into upgrading. This, to me, suggests that I would either need to uprade 4.4 => 5 then migrate to the new box (running JIRA5 ), or just migrate 4.4 to 4.4 on the other box then upgrade to JIRA 5?

Either way i'm sure it will be ok, as it is I'm looking at migrating over to another 4.4 box then doing the upgrade to 5.

If anyone has done this, or knows more about the underlying app and could let me kow what would be the best course of action, they will recieve an e-cookie. :)

Many thanks in advance.

11 answers

1 accepted

3 votes
Answer accepted
Dieter
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 14, 2012
Since it looks like you are familiar with MySQL and know how copy a database from one server to the other i'd suggest this procedure: Install Jira 5 already on the new server with a new database. (This could be a HSQL or MySqL database. It actually doesn't matter since you will later simply change the file db-config.xml on your new system to point to the restored 4.4 database.) Then install the compatible plugins on your Jira 5 server and make sure, everything works fine. All this can be done in parallel while your Jira 4.4 is still productive. Them to migrate from Jira 4.4 or Jira 5 you would need to do the following: shutdown your Jira 4.4 and take a MySQL dump of your Jira 4.4 MySQL scheme which is very fast. Copy the dump to your Jira 5 server and restore it to a new MySQL scheme. Now change the db-config.xml in Jira 5 just to point to the restored database. If you configured your database equally (same user, name, port, password) in Jira 5 you could just copy the db-config.xml from Jira 4.4 to Jira 5. Now to upgrade just restart the Jira 5 on your new server. This will inplace upgrade the database to Jira 5. As some post processing steps you will maybe need to adjust the location of the index (use the default) and the attachment folder. Of course you also need to copy the attachments if you don't have stored them on a network share. I recommend to have attachments on a NAS filer which avoids the necessity to copy them when you move the server around. I'm not sure if this procedure is described equally in the manuals. It is designed for minimum downtime since there is nothing faster than native MySQL dump and restore. As an alternative you could have taken a XML backup on Jira 4.4 and restore this in your Jira 5 but as said the recommended way is the inplace upgrade. Your case isn't described in the manuals since Atlassian assumes that on upgrade your database is in the same place. Of couse you could also do this migration step more than once to do some tests with your customers first.
Rolando April 14, 2012

Wow Thanks Dieter! yes I'm familiar with MySQL enough to do dumps / restores. This very much seems like the way it would work having dealt with other apps.I thought it strange that the official migration guide reccomended using the XML bakcup. Your advice has been very useful.

Dieter
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 14, 2012
Glad to help :). Let me know if i forgot anything essential after you have done the migration.The good thing is you can try it as many times as you want until you feel confident that everything works fine under Jira 5.
Rolando April 14, 2012

Yep process (more or less) goes as such.

  • Install Jira 5 on new Box (Inc all Plugins).
  • Copy over Home / Install directory.
  • Change location of home dir etc in .xml files.
  • Dump, move and restore Database.
  • Start JIRA.

I think that should more or less corver it. :)

Norman Abramovitz
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 15, 2012

Since database changes can occur at any update level, I would highly suggest you migrate first verses putting the upgraded release on the new server first.

1 vote
Renjith Pillai
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.
December 25, 2012

No, the procedure you have said is correct. There is nothing that will point to A, except for the base.url which you can change in your General Configuration once B is up.

Just a hint, when you move your old directory, remember that you have the dbconfig.xml also coming in. This will be pointing to A's database, and remember to point it to the new blank database for JIRA 5. To summarize in simple steps.

  • Get the backup XML from A
  • Install new JIRA 5 (B) using a new home directory
  • Disable emails temporarily as B is a the new server and A is still in production (you need a restart of B)
  • In setup wizard provide the XML from A to restore
  • Copy the data/attachments directory from the old home to new home
  • Do some quick checks, and once you confirm that everything is running, shutdown A, change base.url and make B as the production.

And be aware of this problem which can come up while moving from MS SQL to MySQL - https://confluence.atlassian.com/display/JIRAKB/XML+Import+to+MS+SQL+fails+due+to+a+GenericEntityException+-+Date+Format+Error

0 votes
Amit Girme March 4, 2013

No, dont copy old installation

1. Create NEW DATABASE with required permissions for NEW JIRA USER

2. Install NEW JIRA pointing to NEW DATABASE

3. SQL DUMP procedure : a) Shut down OLD JIRA so no new issues will be created. b) make a SQL dump of OLD database

3. XML BACKUP procedure: a) Backup JIRA data from frontend and create xml zip file at jira-home/export location b) Shut down OLD JIRA so no new issues will be created. c) Move file to jira-home/import of NEW JIRA

4. copy all compatible version plugins as of OLD JIRA

5. Start NEW JIRA if it is shutdown

6. Go to Restore DATA from XML section under Jira admin

7. point the zip filename (zip file should be pointed not extracted xml)

9. copy OLD JIRA-HOME data/attachments folder to NEW JIRA-HOME data/attachments

8. if jira-home location is changed create a soft link at original jira-home location pointing to new one e.g OLD JIRA_HOME => /opt/jira/jira-home and NEW JIRA_HOME=/opt/app/jira/jira-home; create /opt/jira emty directory and "ln -s /opt/app/jira/jira-home jira-home". Make sure NEW JIRA USER have all permissions to /opt/jira Best is to make NEW JIRA USER an owner of /opt/jira directory.

9. After 100% completion of backup Jira will restart

Hope this will help you for future upgrades as I am late to reply :)

0 votes
nkaravias December 18, 2012

The question is, if you migrate from host A to host B, and just import your database data and the $JIRA_HOME directory to B, won't starting up Jira on B fail because everything points to A's location? (IP/DNS)

0 votes
nkaravias December 17, 2012

I have a similar case: I need to migrate from Jira 4.4 (MS SQL) and standup a new server with Jira 5.2 (MySQL). As far as planning this I have come to the following conclusion:

1) Install Jira 5.x on the new server (a new DB gets created and populated with default Jira data)

2) Install all plugins of the old server onto the 5.x Jira installation (make sure everything works post install)

3) Copy the old jira_home to the new box and have Jira 5 point to it (jira-application.properties)

4) Wipe the Jira database on the new server (it was created during the 5.x installation)

5) Create a new database for the 5.x installation and start Jira

6) Import the old database (.xml) via the Jira web interface that appears upon starting (since we just wiped the old one).

7) ...

Am I missing something here? Someone mentioned I should also copy the old install directory, but I see no need for that. I tried this and got a data error at the last part of importing the data.

Thanks,

0 votes
Dieter
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 14, 2012
No, you could just install a new Jira 5 on your new server. i have assumed that Jira on your new server is not used already. But of course you can also upgrade an existing 4.4 on your new server
0 votes
Norman Abramovitz
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 14, 2012

You came to the correct conclusion. Migrate 4.X over to the new server and then upgrade on the new server. It is the safest approach in that the old server continues to run and if the migration fails for some reason the original server is still running. Any issues of upgrading (missing plugins for example) will not affect your user base.

0 votes
Rolando April 14, 2012

So Going by what's been said here i should install 4.4 on the new server migrate accross and then in place upgrade it to 5 ?

Sounds like thats what i'll probably do :).

0 votes
Dieter
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 13, 2012
It's even recommended to use inplace upgrade, please see http://confluence.atlassian.com/display/JIRA/JIRA+4.3+Upgrade+Guide#JIRA43UpgradeGuide-In-placedatabaseupgradeisnowtherecommendedmethod But if you use different databases on both systems i'd recommend to restore an XML backup of the 4.4 system on the Jira 5 system
0 votes
Dieter
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 13, 2012
Do you have MySQL on both servers? If yes you could just dump the database on the 4.4 system and restore it to the 5.x system. Then on your runing Jira 5 installation you would just change the database configuration in db-config.xml to use the restored database and restart Jira.This will do an inplace upgrade from 4.4 to 5.x. This procedure is officially supported since Jira 4.3+. Important: make sure all your plugins on Jira 5 are comptible with that version. Just copying over plugins from 4.4 to 5 usually won't work.
0 votes
Rolando April 13, 2012

ps The Instance has been installed from the binary installer, and is running on Debian 6 linux, with a MySQL database.

Suggest an answer

Log in or Sign up to answer