Restore a Space or multiple Spaces
Restore (import) a space from Confluence Cloud
As the way users are managed is different in Confluence Cloud there are a few more considerations when restoring a space from Confluence Cloud into Confluence Data Center.
See Import a space from Confluence Cloud for a step-by-step guide.
Restore (import) a space from Confluence Data Center
We recommend performing a full backup of your database before restoring your XML space backup. Occasionally the space restore task may fail, and a backup will make it easier for you to roll back.
There are two ways to restore a space or multiple spaces: by uploading a file (local drive), or from a directory on your Confluence server (known as the 'restore directory').
Uploading a file is only suitable for small spaces. For best results and larger sites, we recommend restoring from the restore directory. A very large file may also take some time to restore.
Upload a file
To upload and restore small spaces:
- Go to Administration menu , then General Configuration > Backup and restore
- Select Restore site or spaces
- Under What do you want to restore?, select Spaces
- Under Restore from, select Local drive
- Under Select file, select Choose file and browse for your XML backup
- Select Upload and restore
- You will see a confirmation message
- Select Upload and restore once more
Restore from server
Restoring from the home directory is a reliable alternative for large spaces.
To restore a space from the home directory:
- Copy the XML backup to
<home-directory>/restore/space/.
If you're not sure where this directory is located, see Confluence Home and other important directories for information on how to locate your home directory. - Go to Administration menu , then General Configuration > Backup and restore.
- Select Restore site or spaces
- Under What do you want to restore?, select Spaces
- Under Restore from, select Restore directory
- Under Select a file, type or browse for your space export file in the dropdown menu
- Select Restore
- You will see a confirmation message
- Select Restore now
Space indexing
As you restore a space or multiple spaces, they will be indexed in the same way page index usually happens. That is, records will be added to a queue to be indexed and there is a job that checks these records. Indexing will happen when the record is picked up by this job. For this reason, there may be a small delay before a user is able to see the space in the Space directory or search for content within the spaces restored.
Confluence doesn't do a full site re-index for space and multi-space restore.
Groups and permissions
Importing a space will not import any users or groups that may have been granted specific space permissions in your source Confluence site. This means that if any pages are restricted to these groups, you may not be able to see them until you recreate these groups in your destination site.
Canceled or failed space restore
If you cancel a space restore while it is “queued”, the task will simply be canceled and you will be shown the task details at that point.
If you need to cancel the space restore while it is "in progress", the data that has already been processed and imported will need to be cleaned up before you can restore the same spaces to the destination site. You can still restore other spaces or restore a site.
For example, if you attempted to restore Spaces with keys A, B, and C, but the space restore failed or was canceled after it had already started, you will still be able to restore the Space with key D, but you can’t restore Spaces with keys A, B, or C again until you’ve removed any partially imported data. See Clean up leftover space data from a failed space import to learn how to remove this data.
Troubleshooting
If you have problems importing a space, check out these hints.
- Is your file too large to upload?
This is a very common problem. It happens when the file can't be uploaded to the server in time. To avoid this problem, drop your backup file into the<home-directory>/restore/space
and restore it from there. - Are you trying to import into an earlier version of Confluence?
This is not possible. You can only restore a space into the same version or a later compatible version. - Does a space with the same space key already exist?
Space keys are unique, so if you already have a space with the same key, you'll need to delete the existing space before restoring the new one. - Is the import timing-out or causing out-of-memory errors?
If the space to be restored is very large, you may need to temporarily increase the memory available to Confluence. See How to fix out-of-memory errors by increasing available memory. - Did you download the export file on a Mac?
If you get an error saying that Confluence can't find theexportDescriptor.properties
file, chances are OS X has unzipped the backup for you and sent the original zipped file to the trash. You need to retrieve the original zip file from the trash and then try the restore again. - Did your import fail? Sometimes restoring a space may fail because of invalid data. This can lead to data being left behind in your database. You'll need to clean up leftover space data from a failed space import before you attempt to restore the same spaces again.
- Do you have adequate disk space?
Confluence will need to make copies of the backup file being restored at various points during the restore process. Make sure you have enough disk space to temporarily accommodate multiple copies of the file.