This document describes how to migrate your Confluence data from your existing database to another database. The instructions are designed primarily for migrating from an evaluation to a production database. Large data sets will require third party database migration tools.

This page covers the following scenarios:

  • You should use this page when moving from the embedded database to an external database.

  • Provided your dataset is not large, you may use this method to move from one type of external database to another. For example, from Oracle to PostgreSQL.

  • Similarly, if the dataset is not large, you can use this method to upgrade your database to a new version of the same database. Note: You do not need to migrate your data if you are upgrading the database in place.

Note: If you are simply moving your database from one server to another you can just change the JDBC URL in <confluence.home>/confluence.cfg.xml (if you are using a direct JDBC connection) or in the definition of your datasource (if you are connecting via a datasource).

Limitations of database migration

Database migration

There are two ways you can perform the migration, both described on this page:

  1. Method one is the standard procedure.

  2. Use method two if the total size of attachments in your installation exceeds 500MB.

On this page:

Related pages:

Method one – standard procedure

Step 1: Take note of your add-ons

Step 2: Back up your data

  1. Create an XML backup of your existing data, via the Confluence administration console. See Manually Backing Up the Site. Make a note of the location where you put the XML file. You will need it later to import your Confluence data into your new database.
  2. Shut down Confluence.
  3. Make a copy of the Confluence Home Directory. This is a precautionary measure, to ensure you can recover your data if it is mistakenly overwritten.
  4. If you are using an external database, make a separate backup using the utilities that were installed with that database. This also is a precautionary measure.

Step 3: Set up the new database

Step 4. Install Confluence (same version number) in a new location

Step 5. Download and install the database driver if necessary

Step 6. Run the Confluence setup wizard and copy your data to your new database

Step 7. Re-install your add-ons

Step 8. Check settings for new machine

Method two – for installations with a large volume of attachments

Before you start

Before proceeding with these instructions please check the following.

The instructions below will only work if both of the above are true.

Step 1: Take note of your add-ons

Step 2: Back up your data

  1. Create an XML backup of your existing data, via the Confluence administration console. See Manually Backing Up the Site. Make a note of the location where you put the XML file. You will need it later to import your Confluence data into your new database.
  2. Shut down Confluence.
  3. Make a copy of the attachments directory (<CONFLUENCE-HOME-DIRECTORY>\attachments) in your Confluence Home directory. You will need it later to copy your Confluence attachments data into your new Confluence installation.
  4. If you are using an external database, make a separate backup using the utilities that were installed with that database. This also is a precautionary measure.

Step 3: Set up the new database

Step 4. Install Confluence (same version number) in a new location

Step 5. Download and install the database driver if necessary

Step 6. Run the Confluence setup wizard and copy your data to your new database

Step 7: Copy your attachments across

Copy the contents of the attachments directory (<CONFLUENCE-HOME-DIRECTORY>\attachments) from your old Confluence Home directory to your new Confluence Home directory.

Step 8. Re-install your add-ons

Step 9. Check settings for new machine

A note about case sensitivity in your database

Troubleshooting

If you are unable to restore your XML backup, consult our troubleshooting guide.