Confluence space Export and Import
Asked by Katherine Nji:

I am trying to export and reimport a confluence space from one instance to another.  
I tried the CSV export since they are both cloud instances . However, on countless times when I go to reimport the file on the new instance, it gives me an error message, it starts unzipping the file and half way through it says the import has failed.  
I tried using another approach by exporting to XML. I exported some selected pages of the space and reimported just that file and it worked. It created a new space on the new instance so I moved the information and deleted that space.  
Now I am trying to export other pages and the import crashes 1/2 way through and I get this error message.  
![Screenshot 2024-07-12 192506.png](https://community.atlassian.com/t5/image/serverpage/image-id/335398iA0D12681C158B0E0/image-size/large?v=v2&px=999 "Screenshot 2024-07-12 192506.png") Also, when I do the entire space XML export , I immediately get a failure message when I hit import. The entire space export is about 81,600 KB


Answers:
author: Kristian Klima
body: Hi [@Katherine Nji](/t5/user/viewprofilepage/user-id/5542892)

Yes, your experience is correct as you can only import XML space exports.

If I get it right, you exported a couple of pages from space A from Confluence 1 and imported those pages to Confluence 2.

The reason your second import to Confluence 2 fails is that there is already a space in your C2 with a space key A.

Ever Confluence space has a unique space key. There can be no two spaces with the same key on one Confluence site and, before you ask, you cannot change a space key.

Space key is a part of any XML export AND import.

By importing the first batch of pages, you created in your C2 a space with the key of Space A. As you second export/import carries the same space key, it fails.

You say that you deleted the imported space from C2 ... but did you removed it from the space trash?

Anyway, if I run into multi-stage import issues, I usually do one of the following:

**Workaround 1**

1. Delete the original import from C2 (delete and purge from Trashed spaces).
2. Export the entire Space 1 from C1 and import it to C2.

**Workaround 2**

1. On C1, create a new space - space B.
2. Using an app like [Copy Page Tree](https://marketplace.atlassian.com/apps/22929/copy-page-tree?tab=overview&hosting=cloud) or other method, copy the remaining pages of Space A into Space B.
3. Export Space B from C1 and import it into C2.
4. On C2, using the app or other method, copy the pages from Space A to Space B (or the other way 'round.

I'd go with the first method which will preserve all links between the pages within Space A and assures that permissions and other metadata are preserved across the space as whole.

comments: author: Katherine Nji
body: Hi [@Kristian Klima](/t5/user/viewprofilepage/user-id/5074962) ,  
Thanks for your response. Option 1 looks like a better option but each time I try importing the entire space into C2. I get an error right way.  
The file gets uploaded successfully but doesn't import when I click on import.  

It happens both with the CSV and XML files.   
The CSV is about 62MB and the XMK about 82,000KB.  

<br />

![Screenshot 2024-07-13 121411.png](https://community.atlassian.com/t5/image/serverpage/image-id/335450i19F601F9357D6D38/image-size/large?v=v2&px=999 "Screenshot 2024-07-13 121411.png")![Screenshot 2024-07-13 121505.png](https://community.atlassian.com/t5/image/serverpage/image-id/335451iDF301A177118BAC6/image-size/large?v=v2&px=999 "Screenshot 2024-07-13 121505.png")


author: Kristian Klima
body: Presuming that you removed the original import from the space from the Trashed Spaces folder

.... yourname.atlassian.net/wiki/admin/trashed-spaces

It's time ti get in touch with Atlassian Support


author: Katherine Nji
body: Thank you!   
Indeed I had to empty the trash. After emptying the trash with the newly created space, I could upload the other pages. The bulk upload won't work but page by page works or selected multiple pages when using XML. I just have to repeat the process till I am done.  

Export, Reimport to C2, move the file to it's final location, delete the newly created space that happens each time I import and finally empty space trash. Then repeat


author: Kristian Klima
body: Glad you found the workaround [@Katherine Nji](/t5/user/viewprofilepage/user-id/5542892)


author: Nicolas Grossi
body: [@Katherine Nji](/t5/user/viewprofilepage/user-id/5542892) Welcome! My suggestion is you to contact support.atlassian.com as you have an standard license and this appears to be an issue on atlassian's side.

HTH

Nicolas


Tags: cloud

confluence-cloud