Documentation for Confluence 5.4.
Documentation for Confluence OnDemand and earlier versions of Confluence is available too.

Skip to end of metadata
Go to start of metadata

This page tells you how to import the contents of a Confluence space into another Confluence site, via an XML backup file.

You can export the content of a space, including pages, comments and attachments. The process involves converting the data in the space into XML format. The end product is a zip file that contains XML file(s) and optionally, all the attachments in the space. To transfer this data to another Confluence site, restore this zip file as described below.

You need to have System Administrator permissions in order to restore a space from an XML zip file.

Before you start

Before you start, please check the following important notes.

Note 1: You cannot restore to a previous version

Let's assume you are importing a space from site A to site B. In this case, site B must be running the same version of Confluence as site A, or a later version than site A. The space import is not backwards compatible.

Note 2: You cannot restore to a different major Confluence version

Confluence only supports compatibility for space import and export when executed within the same major version of Confluence. (This issue is logged as CONF-26111.)

Clarifying our terminology: By major version, we mean the version defined in the first two sections of the release number. For example, Confluence 2.2 and Confluence 2.3 are different major versions. Confluence 2.2.1 and Confluence 2.2.6 are the same major version.

Restoration data must share the same major version number. This means that a space export created in one major version of Confluence cannot be imported into a different major version of Confluence. For example, if you create a space export in Confluence 2.3.5, it cannot be imported into a Confluence 2.4.1 site. It can be however imported into 2.3.7. Similarly, a space export created in 5.0 can not be imported into 5.1.2. However, it can be restored into a Confluence 5.0.2 site.

If you need to import a space from a different major version, see the workaround described below.

On this page:

Related pages:

(warning) The information on this page does not apply to Confluence OnDemand.


If you try to restore a space from a different major version of Confluence, you will see an error message similar to the one below and the import action will stop.

Screenshot: Clash of major versions on space restore

Note 3: Make sure the space does not already exist

Confluence will only allow you to restore a space if there is not already a space with that key on the site. If you already have a space with the same key, you will need to delete or rename the existing space before restoring the new one.

Restoring a space from an XML backup

You can restore data from an XML backup file located somewhere on your local computer or a shared drive, or you can copy the XML file into the Confluence installation and restore it from there. The second option is recommended for large backup files. Both options are described below.

To restore data from an XML backup located outside Confluence:

  1. Choose the cog icon  at top right of the screen, then choose Confluence Admin.
  2. Choose Backup and Restore in the left-hand panel.
  3. Choose Choose File and browse for the backup file.
  4. Uncheck Build Index if you want to create the index at a later stage.
  5. Choose Upload and Restore.

To restore data from an XML backup located in your Confluence installation:

  1. Copy your XML backup zip file into the restore directory in your Confluence home directory. For example:
    • On UNIX: /opt/java/src/confluence/deployments/conf.atlassian.com/home/restore
    • On Windows: C:\Program Files\Atlassian\Application Data\Confluence x.x\restore
  2. Choose the cog icon  at top right of the screen, then choose Confluence Admin.
  3. Choose Backup and Restore in the left-hand panel.
  4. The zip file that you copied in step 1 will appear in the list of files under the heading Restore a backup from the Confluence Home Directory on your Confluence Administration Console. Select the zip file.
  5. Uncheck Build Index if you want to create the index at a later stage.
  6. Choose Restore.

Workaround for restoring spaces between major releases

If you need to import a space from an earlier major version, you can use a temporary Confluence installation to upgrade the space export to the right version number:

  1. Download the same version of Confluence as the version you exported the space from. You can get older versions of Confluence at the Confluence Downloads Archive.
  2. Install that version of Confluence on a temporary server.
  3. Import the space into this temporary Confluence site.
  4. Upgrade Confluence on your temporary site to same version as the site where you want to import the space. See Upgrading Confluence.
  5. Export the space from your temporary Confluence site. It will now have the correct version number.
  6. Import the space into your production Confluence site.

30 Comments

  1. Our web server and external database are backed up nightly using server and database backup utilities. Is it possible to restore a single space, not an entire site, from the combination of the server and database backups (not an XML backup initiated by a space administrator)? If so, is there documentation on how to do so?

    1. Hi Jon,

      As far as I am concerned, there is no way (so far) to get a space backup out of the entire backup. As a workaround, you may need to create a separate instance based on the backup data and extract the space from there.

      Cheers,
      Azwan

      1. Thanks, Azwan. I thought that would be the case. Is there a way to automate the full site backup you can manually run from https://wikipprd.cc.nd.edu/admin/backup.action?

        1. The full site backup is already established as a job in Confluence. You can alter the frequency or time to execute the job, too. Other than that, you can try creating a remote client that periodically runs this method:

          Hope that helps!

  2. We imported the Confluence 3.0 Complete Documentation (XML) DOC-20090618.zip into our Confluence Wiki 3.0. The content appears to have made it in correctly but the images did not. The attachments are listed below the page but attachment links are invalid ( clicking on attachment takes you to the "attachment not found page" ). Anyone have similar issues? thanks

    1. Anonymous

      I have the same problem after importing space and uploading attachments. The links on attachments list are not valid. We are using Confluence 2.8. Who can advise how to solve it? Thanks

      1. Anonymous

        I'm observing the same issue. An import of a small export file worked fine, but for a larger file I'm getting the mentioned result.

        A look into the catalina log file shows the reason:

         
        SEVERE: Socket accept failed
        java.net.SocketException: Too many open files
        Does anyone know where I can increase the limit of maximum number of open files?

  3. Anonymous

    Does anyone know how to export a Space from one Confluence instance (say, staging server) to a specific target space in another instance of Confluence (say, production server)?

    1. Hi,

      You just have to do a space backup in the staging server and then restore the backup in the production server. Hope it helps.

      Cheers
      JSashi

      1. This definitely works but I have an additional requirement.  We don't want the restored copy - installed on a open wiki -  to give access to different versions of our documents - we just want the final copy available for public consumption.  Is there any way to wipe out the versioning when doing an export?

        thanks,

        -paulina.

  4. Is it possible to transfer a subtree from one confluence instance to another? I managed to export the subtree to xml data, but I am afraid of importing it because of entitiy ids in the export file.

    What are the prerequisites for the target confluence system? Is it possible and how to I achieve to insert the subtree at a specific node?

  5. Anonymous

    Hi,

    I imported a space from another wiki, but some of the pages are missing the imported space.  Is it possible for me to import specific pages to an already existing space?

    Regards,

    Senthil

    1. Hi Senthil,

      I am afraid that this is no longer possible in Confluence. However, I have found a similar feature request. Please add yourself as a watcher, vote for this feature and add your own comments to this feature request. For further details on how we include new features and improvements, you might want to read this page

      As a workaround, would it be possible to just copy the pages' wiki markup from one Confluence Wiki environment to another Confluence Wiki environment?

      Cheers
      JSashi

  6. Anonymous

    Trying to import the Confluence XML docs on a local duo core machine with 8GB memory.  Import is estimating 3 hours now, seems to be stuck at 23% and I do not know what to do.  There seems no way to safely stop it and the last time I left the page (in a previous attempt on a different machine), the Space was left partially imported and corrupted, no way to remove it without manual editing of a lot of files.

    Is there a safe way to import or stop a possibly failed import of a large XML document set?  The GreenHopper docs imported fine.  I wanted to test how well Confluence could work with a large document set (including backup, export and restore).

    1. Anonymous

      I am trying to restore the Doc space and after 2 hours it is at 32% and tells me it will still take 5 hours! I will let it run over night and report back. 

      1. Anonymous

        After 14 hours it has made no progress and says it needs 1day more. Will kill it. The space will be corrupted and undeletable. So will have to restore the entire site. Found no easy way to delete manually a corrupted space. 

  7. Anonymous

    We are migrating old content from mediawiki to confluence.

    We perform a test migration into a stand-alone Confluence ver 4.2.

    Now we need to back up and restore these migrated data into production Confluence server but unfortunately, production server is ver 3.5 and restore tells me the "typical" error: 

    Restore denied. You can only restore data from the same mayor version. We tried unsuccessfully to change the version of space backup as told here Changing the version of a space backup. Unfortunately I didn’t work.

    Any ideas? How can we migrate space data from Confluence 4.2 to Confluence 3.5?

    We don’t want to repeat all the migration work.

    Thanks a lot, any suggestion will be really appreciated.

     

  8. Anonymous

    I am trying to import a 4.2.5 export into a 4.2.4. This is supposed to work, is it? Same major version. Still complains and does not let me..

    "Restore denied. You can only restore space backups exported from the same major version (e.g. 2.2.x or 2.3.x)."

     

     

  9. Anonymous

    Hi!

    I used the backup and restore function to move a space from one confluence instance (Version 4.2.5) to another (4.2.3). Everything went fine, as far as I can see the space was imported well. My problem is now, that I cannot change the user permissions in that way, that I have a space administrator.

    At first I could not even see the spaces, then I created a user with the same user name as the creator of the original space. When I'm logged in with this user I can see the spaces, but still have no space administrator permissions.

    Has anyone an idea how I can give one of my users this permission or at least how I can delete the spaces?

    Best regards!

  10. Anonymous

    Hey, I installed confluence 4.2.13 - when loading localhost:8090 it gives me an error that ends with:

    " at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:152) "

    why are some components named "LazyReference" with methods called "getInterruptibly"  ?

    I'm just curious, because it seems like shit.

  11. Anonymous

    I am trying to restore a space backup file exported from server with Confluence 4.2.13 installed onto our dev confluence with Confluence 4.2.13 installed and got an error saying "Restored denied. You can only restore space backup exported from the same major version (e.g. 2.2.x or 2.3.x). Should I be getting this error when both servers are having the same major version of confluence installed (i.e. 4.2.13)?  Please help me solving this issue.  Many thanks

  12. How do I restore a zipped file to a new and differently named space?

    I exported a space named "60"

    I created a new space named "52"

    I want to restore the content from "60" into "52"

    Don't see how to do this. There's no way to specify the name of the restored space. Should I be using a different approach?

    TIA.

  13. Anonymous

    hi, I can't find the cog icon. what's wrong with the system?

    1. Hallo

      Perhaps you don't have the right permissions, or perhaps you're using an earlier version of Confluence. This documentation is for Confluence 5.1. You can pick a version from the list at the bottom of the left-hand column on this page.

      Cheers, Sarah

  14. Anonymous

    Hi, I encounter the same problems as mentioned earlier ("Trying to import the Confluence XML docs on a local duo core machine with 8GB memory...."). The log says: "Exception in thread "httpclient-io:thread-4" java.lang.OutOfMemoryError: Java heap space"

    Please help.

    1. quite a common problem. You need to increase the Java memory parameters in setenv.sh or setenv.bat.

       

      e.g. 

      JAVA_OPTS="-Xms512m -Xmx2048m $JAVA_OPTS"

       

  15. Anonymous

    "A descendent page shares the same title of another page in the selected space."

    You couldn't possibly provide a list? 

  16. Given that this entire rigmarole entirely defeats the main technical benefit of use XML, it's really time to revisit this. Having to go through multiple iterations of scratch installs just to upgrade the data in place is just nutty. XSLT would seem to be the right rool here, unless I'm missing something odd like embedding serialized binary data?