At 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
- In Confluence, navigate to the space you want to export.
- Click Browse, then select Advanced.
- Click XML Export.
- Select All pages to export.
- If you want to include comments or attachments, select the appropriate check boxes.
- Click Export.
A progress bar shows you the progress of the export.
- 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.)
- Save the zip file somewhere you’ll be able to find it.
2. Import the space into the new Confluence instance
- In Confluence, from the Dashboard, click Browse, then select Confluence Admin.
- In the Administration section, click Backup & Restore.
- 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.
- Click Browse, locate the exported zip file, then click Open.
- 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.
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