How to Export-Import Confluence Pages and Spaces
Asked by Clay Leonhard:

My team is currently ending our Confluence evaluation server license and have purchased a regular server license. We have opted to NOT adopt all content from our evaluation server license and will   
"wipe the slate clean" to build a new Confluence site. There are select spaces and pages that I would like to export from our evaluation site to the new, permanent site. I have full administrator permissions. I am practicing by exporting a desired page on my evaluation site. The export worked as described in the user guide, where it save the entire contents of my page to a zipped archive of XML files.The intention, from this point, is to import my page/space into another Confluence site, which will be our new, permanent site. I'm not clear how to complete the import process on the other side.

The user's guide confuses me as to which instructions pertain to which importing process. I am needing to know how to import a space/page from one Confluence site into another, not import content from an MS Word doc. All that I see are instructions for importing a text file, but these instructions come under the heading of "Importing Pages from Disk," which is probably not what I need to do.

I did try to follow the import text files instructions via the **Space tools** \> **Content Tools** , choosing to Import. It says to "Type your directory path into the **Import directory** box. I tried typing the path of my zip file and selected other relevant options, such as **Overwrite existing page**. When I select to import, I receive an error message stating "The directory specified does not exist, or cannot be accessed."

From this point, I am lost. Can you provide specific instructions for how to import a space/page from one Confluence site into another? Thanks.


Answers:
author: Maren
body: Hi Atlassian Community,

Maren here from Atlassian.

While it looks like this question pertains to a Confluence Server to Confluence Server migration, I wanted to highlight a few newer resources that will help explain how to import Confluence Server data to Confluence Cloud.

Importantly, we **do not recommend using space or site import/export** (also known as site or space backup and restore) to move from server to cloud. We've made it even easier and more reliable with the [Cloud Migration Assistant for Confluence.](https://confluence.atlassian.com/cloud/cloud-migration-assistant-for-confluence-973486571.html)

If you're looking to migrate from Confluence Server to Cloud, you can find all the information you need to plan, conduct, and optimize your migration at:

* [Atlassian Cloud Migration Center](https://www.atlassian.com/cloud-migration)
* [Plan your cloud migration](https://confluence.atlassian.com/cloud/plan-your-cloud-migration-972349846.html)
* [Migration FAQs](https://confluence.atlassian.com/cloud/faqs-about-migrating-to-jira-or-confluence-cloud-978216197.html)
* [Cloud Migration Assistant for Confluence](https://confluence.atlassian.com/cloud/cloud-migration-assistant-for-confluence-973486571.html)

We've been focused on delivering a better migration experience for customers, including more comprehensive documentation, and would appreciate your feedback.

If you have questions about the guidance or comments for our team, let us know below!

Cheers,  
Maren


author: rrudnicki
body: Hi Clay,

I believe what are you looking for is [on this link.](https://confluence.atlassian.com/display/DOC/Restoring+a+Space)

You just need to:

1. Choose the**cog icon** ![](https://confluence.atlassian.com/download/attachments/157679812/Cog.png?version=1&modificationDate=1361250253653&api=v2), then choose **General Configuration** under Confluence Administration
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**.

Regards,

Renato Rudnicki

comments: author: Elumalai
body: I have migrated the confluence running in windows to RHEL 7.

- Backup the file in confluence

- Install confluence in RHEL 7

- start the confluence and restore the backup file

Now all ok


author: Rodrigo Girardi Adami
body: Hi @David Lunsford \[Agency Consulting Group\]

For you question: "What if I want to import the content of space A into space B from an xml backup? Space B exists as a shell. "

This is not possible directly on a XML backup file. The only option in this case is to merge the content on a space before the export to the XML backup. In other words, import both space A and B to a instance, merge the content, and export one of them again.

Cheers,

Rodrigo


author: Clay Leonhard
body: Thanks, Renato. I tried to follow the instructions you provide, but I encounter an error. When I choose **Upload and Restore** for the file I have chosen (it's one of the XML zip files I had exported), I receive the following error:

The following error(s) occurred:

* A space with the key '\~admin' already exists. Please delete it before restoring a space with the same key.

I don't know what this means. Any suggestions? Thanks.

comments: author: rrudnicki
body: Hi Clay, First of all, make sure you have a backup of your database.It seems you have a duplicate key related to admin space. Follow the steps below:1 - Create a new admin2 - Try to delete the space following this link:<https://confluence.atlassian.com/display/DOC/Delete+a+Space>3 - Import your backup xml againRegards, Renato Rudnicki


author: rrudnicki
body: \* create a new admin user :)


author: David Lunsford [Agency Consulting Group]
body: What if I want to import the content of space A into space B from an xml backup? Space B exists as a shell.


Tags: export

import

page

space

zip