Backup and Restore
When setting up your Confluence site, it's important to consider how you will back up your data, and restore it, if things go wrong.
Recommended backup strategy
Having a robust backup strategy for your Confluence site is essential. You should back up your database, installation directory, and home directories (including attachments) on a regular basis using the database administration or backup tool of your choice.
Manually XML backup
You can export your entire site or selected spaces at any time. The backup will be generated as a zipped XML file.
Scheduled XML backup
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.
Scheduled backups don't use this new approach; it still uses our legacy system. We recommend you stop using scheduled backups unless required because it contains many of the issues resolved in the new system.
Confluence provides a scheduled XML backup option, which backs up your site by performing a full site XML export each day. This method can be useful for small sites, test sites, or in addition to your database and directory backups. We don't recommend you rely solely on this backup method for your production site.
There are a number of reasons why XML site backups are unsuitable for large Confluence sites:
- As the number of pages in your site increases, the XML backup takes progressively longer to complete, and in extreme cases the process of generating the export can cause an outage.
- XML backups can consume a lot of disk space rapidly. For example, a 1GB Confluence site will create 30GB worth of backups in a month, if unattended.
- If the XML export file is very large, restoring your site can take a long time, or may time out.
- Marketplace and other user-installed apps are not included in the XML backup. After importing your backup into a new Confluence site, you will need to re-install all user installed apps.
On Confluence Data Center, the scheduled XML backup is disabled by default.
To learn how to enable this job or change its frequency, see Scheduling a Backup
Restoring your site from a backup
In the event you need to restore your site from a backup, the way you do this depends on your backup method.
- See Restore a Site to find out how to restore data from an XML backup into an existing Confluence site.
- See Restoring data from other backups for tips on how to restore Confluence from a database backup.
Confluence accepts XML backups from Confluence 6.0.5 and newer, but it is only possible to restore a backup to the same or a newer version.
For example, a backup created in Confluence 7.19.0 can only be restored to Confluence 7.19.0, 7.19.1, 8.0, 8.1 or newer. It can't be restored to Confluence 7.18.9, 7.18, or any other preceding version. That's because backward compatibility is not supported.
Recent backup and restore activity
View details about backup and restore tasks that have been run on your Confluence site over the last two weeks at Administration > General Configuration> Backup and restore. This list includes space backups generated in Space tools but excludes backups generated by scheduled backups.
The recent activity table provides an overview of:
task type (space backup, site backup, space restore, or site restore)
file name of the zip file
user who created the task, and
date the task was created.
Screenshot: Backup and restore admin screen
Select the file name to find out more details about a specific job. This will take you to the Task details page. The below table describes what information is available on this page.
The name of the XML backup or restore file.
For backups, you can select the file name to download a copy of the XML within 72 hours of exporting it (this is the default setting). If you chose to save permanently, the download link will not expire.
This could be in progress, queued, canceling, canceled, failed, or completed.
Space backup and restore only
It is the number of spaces contained within your XML space backup or restore zip file.
|Records processed||This is the number of objects processed. Objects are the different records from the database related to your space or site.|
|Queue time||This is the amount of time your task was in the queue before it started processing. Learn more about the queued status below.|
This is the amount of time your task took to run until it was completed, canceled, or failed. Time lapsed doesn't include queue time.
This specifies whether attachments have been included in your backup.
Space backups will always include attachments.
|Created on||This is the date and time the backup or restore task was created.|
|Created by||This is the user who created the backup or restore task.|
This will only appear for backups that haven't been saved permanently.
It is the date the XML backup zip file is scheduled to be deleted from the server. By default, this is 72 hours after the backup was created.
This is the number of records that were skipped while importing your site or space.
Records can be skipped for a variety of reasons, and when they're skipped it doesn't always represent an error or data loss. If you suspect you're missing data from the restore, check the main application log to audit objects that were skipped.
This is a summary of the issues or errors found during the task.
If you need more information about the issue or error, refer to the main application log.
We only process one task at a time to provide a stable and fast backup and restore experience. That means, your task will be placed in a queue when there is another in progress, or if you created the task during a rolling upgrade.
If your task was queued, and someone restarts Confluence, your task will keep its spot in the queue.
A back up and restore will fail if someone restarts Confluence while your task is in progress. In this case, you'll need to run the task again.
A restore also fails if you try to import a file that doesn't match your job, for example, importing a site backup when running a space restore.
Migrate to Confluence Cloud
If you're migrating from Confluence Server to Confluence Cloud, you can use the Confluence Cloud Migration Assistant to migrate your content and spaces.