Importing data between major versions of Confluence

Whip Hubley September 25, 2017

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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 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 ?

Whip Hubley September 25, 2017

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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 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

Whip Hubley September 25, 2017

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
TAGS
AUG Leaders

Atlassian Community Events