Copying a Space from one Confluence wiki instance to another

Cottage in KingstonAt the moment I have a Confluence wiki installed on my desktop. Next we want to install Confluence on a server to test the integration of the wiki with our Umbraco website and LDAP security.

So that we can demo Confluence to others in the group quickly, I need to copy a Space from my local instance of Confluence into the new instance on the server. I’ve searched the Confluence documentation, and it looks like I need to export the space as a zipped XML archive, and then import the xml archive into the new instance. Let’s see how this works.

Before you begin, make sure you have Export Space permissions. Since I’m the administrator of this test Confluence instance, I have full access.

1. Export a space from one Confluence instance

  1. In Confluence, navigate to the space you want to export.
  2. Click Browse, then select Advanced.
  3. Click XML Export.
  4. Select All pages to export.
  5. If you want to include comments or attachments, select the appropriate check boxes.
  6. Click Export.
    A progress bar shows you the progress of the export.
  7. When the export is complete, click the link for Download here.
    (It’s a very small link, so be careful you don’t miss it. I’d suggest to the Confluence team that it should be much more prominent, perhaps even a button.)
  8. Save the zip file somewhere you’ll be able to find it.

2. Import the space into the new Confluence instance

  1. In Confluence, from the Dashboard, click Browse, then select Confluence Admin.
  2. In the Administration section, click Backup & Restore.
  3. Choose a method for importing the space: upload a zipped backup, or restore a backup from a file system.
    Since I want to import a space from another instance, I’ll select the first method.
  4. Click Browse, locate the exported zip file, then click Open.
  5. Click Upload and restore.
    A progress bar shows you the progress of the import.

Since my space was just a few pages, there were no problems, and the whole process took just a few minutes. With a large space I imagine this might take a lot longer.

The Confluence documentation has lots of warnings about not copying a space over another space (if you try to import a space that already exists in a Confluence instance). This made me a bit nervous, but when I tried to do this very thing, Confluence warned me that a space existed with the same key, thus saving me from overwriting my files. I think if I was going to do this in a development environment, I’d want to test it several times in a test environment first, to be sure I didn’t overwrite anything unintentionally.

The main thing to watch for seems to be the space key. When you export a space, it copies everything from the space, including the space key. If you want to copy a space and import it into the same Confluence instance, you should use the Copy feature, and give your new space a different space key.

Resources:
Exporting a space: Exporting Confluence Pages and Spaces to XML
Importing a space: Restoring a Space

 

If you liked this post, consider subscribing to my RSS feed. Or have posts delivered via email. Thanks for visiting!

Photo via Flickr user DarkShadowSpectrum

2 thoughts on “Copying a Space from one Confluence wiki instance to another

  1. Hi Jenny
    Thanks for this, it works well. I just exported a selected set of pages from a space on one Confluence server to another and haven’t found anything wrong yet. It seems to take a long time to export: about 38 minutes for nine pages with four attachments and and three displayed graphics. Importing the ZIP took about 10 seconds.
    I think I may have found the company a way of saving about $2000 a year in plugin licenses! We’ll see.,,
    /Phil

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.