How do I transfer a project from H2 DB to Postgresql Edited

The Hard-drive of the machine I was evaluating Jira with died shortly after I acquired a starter license. I setup my new production instance of Jira on a server with Postgresql DB. But now I want to transfer just a single project from the H2 DB evaluation install (I have managed to recover the files and can access the H2 database) without messing up my user accounts and everything else now on my Postgresql db. So I don't want to migrate wholesale, just a project. Can I do this?

1 answer

1 accepted

0 votes
Accepted answer

Steve,

 

You'll need to restore the original Jira instance in order to get your project back. It won't be possible to recover from the H2 DB directly.

For this, you have two options:

  1. You have a new installation of Jira, stop it, and in the dbconfig.xml file you can direct it to the H2 database that has the old data. This will recover the old Jira instance. From here you can export your desired project.
  2. You can restore the automatic backup from <Jira Home>/export on the old instance so long as you didn't disable automatic backups. You can do this on your new Postgres instance. This will restore the entire Jira instance, and if you only wanted the one project, it might require quite a bit of cleanup.

Please take the time to review this and let me know if you want any more details on either option.

Regards,

Shannon

Thanks Shannon, option 1 was simple enough .. but after pointing dbconfig.xml to my old database and restarting jira I can see my project, but I do not see any of the issues. I only copied the /var/atlassian/application-data/jira/database directory, I thought that would be enough for the entire contents of the old instances database.

Can you think of any reason I would see the project, but not the issues?

Cheers,

Steve

Steve,

I would first try reindexing Jira entirely and see if that helps your issue.

If not, it could be that dbconfig.xml isn't pointing to the right place. Can you check that it's now pointing to where you placed the H2 file exactly? 

If it is, then I would recommend checking the Jira server logs, as Jira might be having an other issue.

Regards,

Shannon

Thanks Shannon - All good now. I had various issues with not being able to login as sysadmin on my old instance but sorted it with some H2 DB hacking ;)

Glad to hear you got it sorted out!

Which suggestion was it? The indexing?

Shannon

Hi - your original response is what got me down the right path. I worked the indexing out for myself but hit a stumbling block with not being able to export the database because I wasn't logged in as sysadmin for which I needed to some database gymnastics - actually just copied the hashed password for a user I could login as into the sysadmin user entry.

Great, thank you for clarifying that! 

Take care and have a pleasant week, Steve.

Regards,

Shannon

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Wednesday in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

380 views 0 7
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you