Migrating between Mysql and Postgres for Atlassian Tools

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:

  1. Create an export of your data as an XML backup. See Backing up data for details.
  2. 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.
  3. Shut down your Jira server.
  4. Make a backup of your Jira home directory and Jira installation directory.
  5. Delete the dbconfig.xml file in your Jira home directory.
  6. Restart Jira, and you should see the first step of the JIRA setup wizard for configuring your database connection.
  7. Configure Jira’s connection to your new database (created in step 2 above) and click the ‘Next‘ button.
  8. 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:

  1. 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.
  2. Stop Confluence.
  3. 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.
  4. Follow the database setup instructions for your new database
  5. You will install Confluence again, with a different home directory path and installation path. During the setup:
    1. Choose Custom Install. (Do not choose to upgrade your existing installation.)
    2. 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.
    3. 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.
  6. Enter your license key, as usual.
  7. Choose Production Installation as the installation type.
  8. Choose My own database, then select your particular database from the Database type dropdown menu.
  9. When prompted to choose My own database, select your new Database type.
  10. Enter your database details. Use test connection to check your database is set up correctly.
  11. 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:
    1. Browse to the location of your XML backup, and choose Upload and Restore.
    2. 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.
  12. Copy the contents of the attachments directory (\attachments) from your old Confluence Home directory to your new Confluence Home directory.
  13. 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.titleMigrating between Mysql and Postgres for Atlassian Tools
seo.descriptionOccasionally 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.titleAtlassian Database Migration | Atlassian Migrations | Database Migrations | Addteq Inc.

true

seo.image
seo.image.width350px
seo.image.height350px
Related Content
Man working on laptop, free public domain CC0 photo
Enhancing Accessibility in Jira & Confluence with Unstoppable
Discover how Unstoppable enhances accessibility in Jira and Confluence, making these tools more inclusive...
addteq_fb_product4-1
Editable Excel Sheet in Confluence: Best Tools & Methods
Learn how to import and edit an Excel sheet in Confluence. Discover the best tools, including Excellentable,...
Excellentable collaborative editing
Unlock the power of Pivot Tables in Confluence with Excellentable
Discover how to enhance your Confluence experience by creating dynamic pivot tables with Excellentable....

Leave a Reply

Your email address will not be published. Required fields are marked *