Production Backup Strategy

Confluence stores its application data (such as pages, change history, or space information) in the database you connected during installation. To keep that data safe, use one of the methods described on this page to back up the database. There are two ways you can back up the contents of your database: 

  • Using native database backup tools  RECOMMENDED
  • Using Confluence's backup utility


Since Confluence 8.3, we have changed the way we do backup and restore. Learn more about these changes in the Confluence 8.3 Release Notes.

In Confluence 9.0, we removed the legacy backup and restore system. This means that scheduled backups, which used our legacy system, are no longer available.

For regular backups of production instances, use your database’s native backup tools. You may also use the backup/restore API to create XML backups, but make sure you move all backup files to a dedicated secure storage for security and redundancy purposes.

Native database backup tools offer a much more consistent and reliable means of storing (and restoring) data while Confluence is active. When Confluence is in use, there’s no guarantee that XML backups will be consistent as the database may be updated during the backup process.

Since Confluence 8.8, User Directory passwords are automatically AES encrypted. Be sure to backup the relevant keys under your local confluence-home/keys for single-node instances (or your shared home directory for clustered instances).



On this page:


Related pages:

Establishing a production system backup solution

We don’t recommend relying on XML backups as a main backup method. Instead, we recommend establishing a robust database backup strategy:

  • Create a backup of your database using the tools provided by your database. If your database doesn’t support online backups, you will need to stop Confluence while you do this.

  • Create a copy of the home directory on each of your instances.

  • Create a copy of the shared home directory, if you have one (see Confluence Home and other important directories).

  • If Confluence is configured with OpenSearch, create a snapshot of your OpenSearch indexes.

Having a backup of your database, home directories, and OpenSearch indexes is more reliable and easier to restore than a large XML backup. 

Which files need to be backed up?

Backing up the whole home directory is the safest option, but most files and directories are populated on startup and can be ignored. At a minimum, these files/directories must be backed up:

  • <conf-home>/confluence.cfg.xml
  • <conf-home>/attachments (or <shared-home>/attachments if you are running a clustered instance)  

The rest of the directories will be auto-populated on start up. You may also like to backup these directories:

  • <conf-home>/config – if you have modified your ehcache.xml file.
  • <conf-home>/index – if your site is large or reindexing takes a long time – this will avoid the need for a full reindex when restoring. Note: This is only necessary if your Confluence instance is configured with Lucene (default). See the section below if you use OpenSearch.

The location of the home directory is configured on installation and is specified in the confluence.init.properties file. For installations created with the automatic installer, the default locations are:

  • Windows    C:\Program Files\Atlassian\Application Data\Confluence
  • Linux     /var/atlassian/application-data/confluence

For clustered instances only: Backing up the whole shared home directory is the safest option, but some files and directories are populated at runtime and can be ignored:

  • <conf-home>/thumbnails
  • <conf-home>/viewfile. 

How do I back up my database?

The commands to back up your database will vary depending on your database vendor, for example the command for PostgreSQL is pg_dump dbname > outfile.  

Refer to the documentation for your particular database to find out more. 

How do I restore my database?

Our guide on Migrating Confluence between servers has instructions on restoring a backup using this technique.

How do I take a snapshot of my OpenSearch indexes?

This step is only necessary if your Confluence instance is configured with OpenSearch.

If your site is large, reindexing can take a long time. Taking snapshots of your OpenSearch indexes will avoid the need for a full reindex when restoring.

Refer to the OpenSearch documentation on how to setup automatic/manual snapshots on your OpenSearch cluster.

Other processes

XML site backups can be used for other processes in Confluence, such as moving servers or switching to a different database, as well as for archiving spaces to save space. Using the backup strategy described above will work for those processes too.

If you would like help selecting the right migration tools, or help with the migration itself, reach out to one of our Atlassian Solution Partners.


Last modified on Jul 30, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.