It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to restore JIRA from a full database backup?

Per many recommendations (including Atlassian's) I have been backing up my JIRA instance using:

  1. A full native DB backup (`pg_dumpall` for postgres in my case)
  2. A snapshot of the JIRA data dir

Now I am trying to actually do a restore to a brand new server (the old one is gone) and am having trouble getting it to work.

First, when I fully restore the database in advance of the JIRA installation, JIRA does not recognize the existing data at all and goes though the process of a fresh DB creation. When the installation is complete, the data is definitely not in JIRA... presumably because JIRA altered the restored database (but I didn't dig into this).

Next I did afew variations of the following:

  1. Stop JIRA
  2. Drop the JIRA DB
  3. Re-run the postgres restore script (`psql -f pg_backup_file postgres` as user postgres)
  4. Stop and restart PostgreSQL (for good measure)
  5. Restore the JIRA data dir snapshot
  6. Ensure the DB connection works properly for JIRA
    • (I had to change the user password, so I fix DB connectivity by either altering `dbconfig.xml` directly and/or changing/testing with ``)
  7. Restart JIRA
  8. Connect to my JIRA URL

When I do this, JIRA still does not recognize any of the restored project data. I can log in successfully to JIRA, but he project list is empty.

What is the correct way to restore JIRA from a full database backup?

2 answers

1 accepted

8 votes
Answer accepted
nic Community Leader Jul 29, 2013

Ahh, nicely spotted!

Yes, next time, I will also try to remember to say "Check that you are connecting to the right database name - is Jira definitely looking at the restored data and not another area?"

Nic's other answer is also critical. Without re-indexing, all the issues will exist... but only if accessed directly. This makes it look like your restore did not work since no JIRA queries or any non-direct views will see the issues at all. Based on Nic's comment in the other answer, this is a known issue. DON'T FORGET TO REINDEX!

3 votes
nic Community Leader Jul 29, 2013

Ah - step 8 and the following paragraph are shouting at me.

The fact you can log in, and get some screens implies you've got something there. Specifically though, you don't mention re-indexing.

My instincts are screaming that you've done everything right, except rebuilding the index, and it's actually working fine, except for stuff that relies on the index... Go to Admin -> indexing and rebuild the whole thing. It could take a while if you've got a lot of data, but try it and let us know!

I was quite excited that this would work... but it did not. The re-index completed successfully, but there are still no projects and/or issues.

nic Community Leader Jul 29, 2013


Ok, sadly, there's a string of questions now. Can you check what is in the database now? Specifically the jiraissue table. If there's stuff in there, then pick one issue and see if you can get to it directly (http://yourjira/browse/ABC-1). Finally, what is your log saying as Jira starts up? What does it think it's connecting to and is it recognising any of your data? Any warnings or errors.

Ok, more sadly, while checking the jiraissue table I realized that I had JIRA looking at the `postgres` database, and not the `jira` database. ie: my restore worked well, except I didn't tell JIRA to look at it. All is well now (or at least, I'm on the right road). thanks for the kick!! Nic, if you want to make a quick answer along the lines of "make sure JIRA is pointing at the correct database name in your restore" I'll accept it as the correct answer. Otherwise I'll wait a bit and answer it myself so others don't have the same issue (assuming people as dumb as me exist out there :) ).

Like Unknown Unknown likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Calling all Jira Cloud users! Give us feedback on our exploration of a new navigation.

Hi everyone! My name’s Matt and I’m a product manager at Atlassian. I work in the navigation & findability space for all our Jira Cloud products. We’ve been working on trying to improve the exp...

1,040 views 16 12
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you