Restoring Jira Server from a database backup

Daniel Winter February 26, 2018

I wanted to restore a backup from our jira instance. As per recommendation I did a pg_dump of the jira database.

I did now a fresh install of the server. Copied the old jira home directory to the new serve and did a pg_restore with my backup dump.

I checked that the dbconfig.xml is configured correct and then started jira. Now the jira setup wizard starts where I can either configure jira to start as a new instance or start hte import wizard.

 

Option a) is not working for me as I have crowd configured and it just doesn't let me create a user. It says the user directory is read only.

Option b) is not working for me as it requires an xml backup that can be restored. 

 

No I'm stuck and would need some advice.

 

Cheers,

Daniel

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 28, 2018

First, what version of jira is your database backup from? And what version of Jira are you trying to restore this backup to?   It matters because if you're database backup is from a Jira 6.x or earlier, you should really not try to upgrade this directly to any Jira version such as 7.2.0 or higher directly.   There are a number of known problems that can occur when trying to do this kind of upgrade.

Since you are seeing the setup wizard for Jira in the web browser, this can only mean that either Jira does not recognize the database as being setup, or the settings in the dbconfig.xml are incorrect.  Either way, Jira only will show that setup wizard on startup when there is no existing data in the database it is connected to, or if it's not connected to a database at all.

If you're installing the exact same version of Jira as the backup, then restoring the entire home directory before you start up Jira is fine.   But if the new install is a different version of Jira, its possible you would have user plugins that cannot be started in their current versions for this version of Jira.  For those kinds of upgrades, it might be necessary to move the contents of the $JIRAHOME/plugins/installed-plugins/ directory to a temp directory outside the Jira home.

I would recommend stopping Jira, then looking more closely at the $JIRAHOME/dbconfig.xml to make sure it is setup to connect to the correct database.   Another way to test this out is to use the Jira configuration tool. Not only can this tool create/update the dbconfig.xml for you, it also has a utility built into it to test a database connection where the utility will try to connect to your database with your supplied username/password and make sure that the connection can be made.

Suggest an answer

Log in or Sign up to answer