Forums

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

Upgrading JIRA from 4.2.3 to 4.4.3

Xabier Davila October 31, 2011

Hi,

I'm trying to upgrade JIRA 4.2.3 to 4.4.3. (so far, in a Sandbox)

First question is, can I do this in one go or should I upgrade first to 4.3, then to 4.4.3

Second question is, when following the Upgrade Documentation, I get pointed to do a fresh JIRA install. When starting JIRA for first time and following the wizard,

* Not sure on which folder I should be using for {<jira-home>}

* What I should do with the DB settings.

Can you help me with this?

Thanks

3 answers

1 accepted

0 votes
Answer accepted
GilesG
Contributor
November 9, 2011

Hi Xabier,

I'd recommend following the Upgrading JIRA Manually guide in the JIRA 4.4 documentation. (You won't need to upgrade to an intermediate JIRA version.)

Just a few points of clarification:

  • As of JIRA 4.4.0 and when upgrading to this version or later of JIRA, you no longer need to do an XML export from your old version of JIRA, followed by an XML import to your upgraded version of JIRA, if your old version of JIRA is later than JIRA 4.0, which is true for your situation.
  • When upgrading to JIRA 4.4.3 from 4.2.3, you only need to 'point' your upgraded JIRA 4.4 installation at your database instead, the instructions of which are covered in the guide above.
    (However, make sure you back up your database first - using your database's own backup tools - since the JIRA 4.4+ upgrade process will make slight adjustments to your existing JIRA database, making it incompatible with JIRA versions prior to the version you're upgrading to.)
    • 'dbconfig.xml' files for storing JIRA's database connection configuration are new to JIRA 4.4 (see the JIRA 4.4 Upgrade Notes for details), so you won't find this file in your old version of JIRA.
    • If you follow the Upgrading JIRA Manually guide, JIRA 4.4.3 will create a 'dbconfig.xml' file for you when you use the JIRA Configuration Tool during the upgrade process. Otherwise, you can create it manually, the instructions of which are covered in the JIRA 4.4 Upgrade Notes.

Hope this helps,

Cheers,

Giles.

Jared Farrish
Contributor
November 9, 2011

@Giles - I am currently working on an upgrade from 4.2.1 to 4.4.3 (authoring steps), and what I am doing is creating a db backup in MySQL (after stopping our current JIRA install), copying that to a new file, editing the SQL to CREATE a new database with a version number (jiradb_4.4.3, for example), creating a new user for the table to match, then editing the DB connector in conf\server.xml. Is this a wrong approach?

0 votes
GilesG
Contributor
November 9, 2011

Hi Jared,

Is there a reason why you are creating a new database (with new name) and a new user?

I ask this question because you actually don't need to modify your existing JIRA 4.2.1 database (or create a new one) for your JIRA 4.4.3 upgrade. Just ensure you have a backup of your JIRA 4.2.1 database as you mentioned above. The purpose of this JIRA 4.2.1 database backup is in the unlikely event that you encounter an issue with your JIRA 4.4.3 upgrade and will need to roll back to JIRA 4.2.1 installation - which will require you to restore your original JIRA 4.2.1 database from your backup using MySQL tools.

You only need this JIRA 4.2.1 backup because when upgrading to JIRA 4.4.3, JIRA will automatically 'upgrade' your JIRA 4.2.1 database to make it compatible with JIRA 4.4.3. Once this happens, your JIRA database will no longer be compatible with JIRA 4.2.1 (and you can no longer use that 'upgraded' JIRA 4.4.3 database to work with JIRA 4.2.1 if you need to roll back to JIRA 4.2.1).

In JIRA 4.4.0 (and later), the 'dbconfig.xml' file in your JIRA Home Directory is what JIRA uses to connect to your JIRA database. Rather than using the JIRA Configuration Tool to create this file, if you want to 'hand-craft' this file manually (and better understand how to configure a 'dbconfig.xml' file when upgrading to JIRA 4.4 and beyond), please read this section of the JIRA 4.4 Upgrade Notes.

To sum up, once you:

  • have a properly configured 'dbconfig.xml' file (configured for your existing JIRA database) in the root of your JIRA Home Directory,
  • have your upgraded JIRA installation configured to use your existing JIRA Home Directory and
  • you start JIRA 4.4.3

JIRA 4.4.3 will 'upgrade' your JIRA 4.2.1 database.

I hope this clears things up - if not, please feel free to ask any more questions.

Cheers,

Giles.

Jared Farrish
Contributor
November 9, 2011

Thanks Giles. The reason I use this approach is to ensure I have backups and don't wipe out the only db I have; I just don't trust myself, I suppose. It's not really that complicated when you actually do it. The dbconfig.xml is new to me; I just usually edited the server.xml file. I usually like editing the files themselves when possible/practical, unless it's much preferred and suggested not to.

GilesG
Contributor
November 9, 2011

You're welcome Jared.

As I mentioned above, the dbconfig.xml is a relatively new concept in JIRA (introduced in 4.4.0), but it was introduced to make the whole JIRA upgrade process easier for future versions of JIRA.

Like the dbconfig.xml file, the JIRA dev team (and others) have been gradually migrating other aspects of JIRA which customers are likely to customise from the JIRA Installation Directory to the JIRA Home Directory, as this also simplifies the upgrade process.

Cheers,

Giles.

Jared Farrish
Contributor
November 9, 2011

Something else they could add are the keystore/cacerts file.

Jared Farrish
Contributor
November 9, 2011

Another reason for using version-based directories, database, and db user is that if the upgrade fails, we can revert and bring back the old version. The last upgrade we tried actually did fail (due to poor due diligence on my part involving two plugins). I like the idea that if something goes wrong, we have the option to put it back online and resolve any issues without too much heartache and downtime.

GilesG
Contributor
November 10, 2011

Hi again Jared,

Just to mention (in case you weren't aware), we have high-level step-by-step instructions on how to bring back your old JIRA version in the event that an upgrade doesn't succeed.

These instructions are provided on our Rolling Back a JIRA Upgrade page, which has two procedures describing the steps you need to take, each one applicable to our different upgrade procedures (one of which is the Upgrading JIRA Manually I mentioned above).

Also, with respect to migration of the keystore/cacerts file, you might want to vote (and optionally comment) on the following improvement request:

Cheers,

Giles.

Jared Farrish
Contributor
November 10, 2011

Another wish - Can we please have one login for all Atlassian sites?

0 votes
MichaelF November 8, 2011

Hi Xabier,

I m in the middle of executing a similar manouver, except I also need to disconnect a current setup of Crowd which we don t need to use anymore.

Note: the instructions below is dependant on that you don t use any specific plugins/LDAP or AD integration/SSL - HTTPS certificates or any other obscure settings in your Jira implementation. If I was in your shoes I would try this manouver in a secure test environment first.

My suggestions on how to go about this in your case is as follows.

1. Do a XML backup of your current 4.2.3 Jira and copy it to a safe location on your HDD. ( to be used later )

b. shut down the Jira 4.2.3 service ( in case you run it on MS platform )

2. Copy the file dbconfig.xml from your current 4.2.3 Jira to a safe location on your HDD. ( to be used later )

3. Install the new 4.4.3 Jira in a new folder next to the current 4.2.3 ( do not select to run as service at this time, you can create the service later ( this is if you install on MS platform ) ( don t start final setup yet ))

4. Make a copy of the \application data\jira\data\attachments folder and place it somewere safe. ( to be used later )

5. Copy the content of the attachments folder to the new location for attachments

6. copy the dbconfig.xml (done in step 2 ) to the \application data\jira folder and edit it to fit the DB name,usr and pw you want.

7. Start the new Jira using the startup.bat file found in the \jira\atlassian-jira\bin folder.

8. Browse ( on the local server ) the new Jira on the default port 8080 ( http://localhost:8080 ) Note: If you need to run the Jira on another selected port this is changed in the server.xml file.

9. If the DB config is the correct in the dbconfig.xml file you should now be looking at the setup screen which allows you to restore a XML backup file, put in the path and filename of the XML backup you created at step 1.

10. If you succeeded so far, next step is to delete the old Jira and it s service and to create a new service for your new Jira.

Good Luck

//Michael

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events