Importing data between major versions of Confluence

Hey there. We have a test instance of Confluence 6.4.1 and a production instance of Confluence 5.8.4 and I would like to regularly update the test instance to have the same content as production. Is it possible to export the database (in our instance postgres) along with the attachments directory from the earlier version and import them into the latest version ? I'm guessing the schema has changed between versions but can we manually run the schema update script to handle this ? Otherwise our test instance is going to get quickly out of date before we can update live. Thanks. 

1 comment

Mizan Community Champion Sep 25, 2017

You mentioned : Is it possible to export the database (in our instance postgres) along with the attachments directory from the earlier version and import them into the latest version ? 

By doing this you are actually upgrading confluence. When you start Confluence 6.4.1 , it will detect that the database is for version 5.8.4 and initiate an upgrade for the database and the new required tables will be created or modified

However, the version of test instance should always be same as the production. Why you need a test instance on a newer version ?

Thanks for the response. The upgrade from 5.x to 6.x has already taken place and the schema has been updated. But my concern is that if I now attempt to import data from 5.x into 6.x then during startup it will recognise an earlier schema and refuse to start. If that's the case then I wonder if we can manually run the schema update to enable the application to start. We have a test instance of a newer version because we are testing the upgrade from 5.x to 6.x and then was to keep the 6.x version up to date until it's time to migrate.

Mizan Community Champion Sep 25, 2017

Welcome , I have never tried this myself but the upgrade should initiate again after you import the database from the production.

if the data is less you can also try importing XML https://confluence.atlassian.com/doc/restoring-a-site-152034.html

OK this does work fine. Initially on startup you'll see something like the following:

Confluence will not start up because the build number in the home directory [7401] doesn't match the build number in the database [5982]

But to fix this just edit the buildNumber in <confluence_home>confluence.cfg.xml to the earlier value and all required schema changes will then be applied on startup.

Comment

Log in or Sign up to comment
Community showcase
Posted Sep 17, 2018 in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

602 views 8 6
Join discussion

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