Occasionally we come across customers who need to migrate their Atlassian Server or Data Center tools from one database to another. One of the most frequent migrations we deal with is migrating the database from Mysql to Postgres. For Bitbucket Data Center, it has a built-in Database Migration Wizard, which allows migrating from one database to another by providing the connection details of the new database. For migrating to Postgres or other supported database types, you would fill out the information the wizard asks you for:
But for tools like JIRA Software and Confluence, there is no migration tool, and instead, you have to go a different route by migrating using the XML export and import. For JIRA Software, the steps are:
- Create an export of your data as an XML backup. See Backing up data for details.
- Create a new database on your new database server to house Jira’s data. See the appropriate database configuration guide in the Connecting JIRA to a database section for the creation instructions.
- Shut down your Jira server.
- Make a backup of your Jira home directory and Jira installation directory.
- Delete the
dbconfig.xml
file in your Jira home directory. - Restart Jira, and you should see the first step of the JIRA setup wizard for configuring your database connection.
- Configure Jira’s connection to your new database (created in step 2 above) and click the ‘Next‘ button.
- On the ‘Application Properties’ setup page, click the ‘import your existing data‘ link and restore your data from the XML backup created in step 1 above.
Similarly, for Confluence, the steps are:
- Create an XML backup of your existing data. See Manually Backing Up the Site. Make a note of the location where you put the XML file. Later, you will need it to import your Confluence data into your new database.
- Stop Confluence.
- Make a copy of the attachments directory (
\attachments
) in your Confluence Home directory. Later, you will need it to copy your Confluence attachments data into your new Confluence installation. - Follow the database setup instructions for your new database
- You will install Confluence again, with a different home directory path and installation path. During the setup:
- Choose Custom Install. (Do not choose to upgrade your existing installation.)
- Choose a new destination directory. This is the installation directory for your new Confluence instance. It must not be the same as the existing Confluence installation if you perform setup on the same server.
- Choose a new home directory. This is the data directory for your new Confluence instance. It must not be the same as the existing Confluence installation if you perform setup on the same server.
- Enter your license key, as usual.
- Choose Production Installation as the installation type.
- Choose My own database, then select your particular database from the Database type dropdown menu.
- When prompted to choose My own database, select your new Database type.
- Enter your database details. Use test connection to check your database is set up correctly.
- On the load content step, choose Restore From Backup. This is where you will import the data from your XML backup. There are two options for accessing the XML file:
- Browse to the location of your XML backup, and choose Upload and Restore.
- Alternatively, put the XML file in the Confluence home directory of the new site (
\restore
) then choose Restore. This is the recommended method for large XML files.
- Copy the contents of the attachments directory (
\attachments
) from your old Confluence Home directory to your new Confluence Home directory. - Re-install your Marketplace apps
The steps above are generalized for migrating between any two supported database types and not only applicable for Mysql to Postgres. In a follow-up blog post, we will also go over an example of a migration we performed from a customer’s on-premise environment to a Codefactori managed hosting platform on AWS. The database was migrated from MSSQL to AWS RDS-based Postgres.
true
seo.title | Migrating between Mysql and Postgres for Atlassian Tools |
---|---|
seo.description | Occasionally we come across customers who need to migrate their Atlassian Server or Data Center tools from one database to another. One of the most frequent migrations we deal with is migrating the database from Mysql to Postgres. For Bitbucket Data Center, it has a built-in Database Migration Wizard, which allows migrating from one database to another by providing the connection details of the new database. |
browser.title | Atlassian Database Migration | Atlassian Migrations | Database Migrations | Addteq Inc. |
true
seo.image | |
---|---|
seo.image.width | 350px |
seo.image.height | 350px |