Imported a page into a space. Accessing the page shows a display of corrupted characters. Why ?
Asked by Zbigniew Gebka:

Using Confluence 6.4.0

On a Space. Select Space Tools -\> Contents Tools and then export tab. Select XML export format. Select Custom Export. Select the one page of interest and hit export tab.

The Exporting Space Dialogue information is shown below

1. [Running task](https://stsvxjira02.uk.astrium.corp:8442/admin/longrunningtask.action)
2.

   Exporting Space - In Progress {#toc-hId-1787787643}
   ---------------------------------------------------

**Exporting Space**

|---------------------|---------------------|
| **Time Elapsed:**   | Less than a second  |
| **Time Remaining:** | Unknown (estimated) |
| **Completion:**     | 100% complete       |

|---|
|   |

Export complete. Download [here](https://stsvxjira02.uk.astrium.corp:8442/download/temp/Confluence-space-export-172348-108.xml.zip).

I have assumed the export has completed as zip file**Confluence-space-export-163443-106.xml.zip** is created. A bit confusing as there is a display of 'Running task' and In -Progress. Is this a problem ? The zip file consists of

**attachments**directory + various subdirectories

**entities.xml**

**exportDescriptor.properties**

I then go onto the same server and access another space. I import the page from the import directory. A page called **Confluence-space-export-163443-106.xml.zip** has been created as expected. I select the page and unfortunately the following is displayed:-

[Confluence-space-export-163443-106.xml.zip](https://stsvxjira02.uk.astrium.corp:8442/display/ZGBLK/Confluence-space-export-163443-106.xml.zip)

* Created by [GEBKA, Zbigniew \[UK\]](https://stsvxjira02.uk.astrium.corp:8442/display/~GEBKA_Z "") [about an hour ago](https://stsvxjira02.uk.astrium.corp:8442/pages/viewpreviousversions.action?pageId=2457664 "Show changes")

PK ??\*Lattachments/PK ??\*Lattachments/65576/PK ??\*Lattachments/65576/65578/PKU?\*LU\~j: x attachments/65576/65578/1mVw8\\????#??c??Q?#U? ?D???{??F?f?V!jSU??M=???F??6}?}?w\\????u???w_?}?'??1#\`??Z_?l????b7???:?P?% Ya\<?(?$??Cj?y??????8.?+??????g?xU6I???b???!?pJM?$?Ko\&Q_OS?????\>??.?u??n?R?v????????R\~$?@c??R?D??R???\>???'? #???MLX?N????k??'???$@O?F??J?r??:V?%?L?HX????jV;60#8???qQ?-m???U?\<?\^v f?4?@?????+?N???}g???????cZ}???r???7??b?y??b????"{(??$kh??r?J??C??W???+?l?"P??\*??b???=??o\~? ;\]???R?:??!\&?-???fW?!????{+?????\*???)???I?og(?Y??#r??+bo??\\'???;'x' w;\^???$?O??f?w??????;????9?L65??h?Tr\<???p?\>a????????F1????i?P????? ?????WC?4???OPj???w??Y_?e?U?fB??o???O??mM??g\]??

goes on and on.....

Cannot see any Errors in the **atlassian-confluence.log** file during export or import.

Any ideas what is wrong ? Thanks


Answers:
author: AnnWorley
body: Hi Zbigniew,

Thanks for the detailed description of the steps you took. From that, I have an idea what's happening.

You would think that an export from Space Tools would be imported from Space Tools but in fact, to import a space you have to go to Confluence Admin\>Back-up \& Restore (not Confluence Admin\>Backup administration, and not at the space level.)

The import tab on the Space tools\>Content tools page is "to import text files from a directory on the Confluence server." It's not for XML back-ups.

It sounds like you may be trying to export pages from one space to another in the same instance. The best way to move pages from space to space is to use the copy or move option from the "..." menu at the top right of each page.

Thanks,

Ann

comments: author: Zbigniew Gebka
body: Hi Ann,

Thank you for your reply. I must admit reading through the documentation was quite confusing and there had to be some obvious explanation to the problem. I've learnt that the Export xml functionality is for a 'space' and not for a 'page' or 'pages' which was my downfall.

**I followed your recommendations above for exporting and restoring 'space' and I was able to import an exported 'space' from another Confluence system** . **Thank you.** The import worked but initially I couldn't see the new 'space' in Spaces -\> Space Directory. I then accessed Confluence Administrator -\> General Configuration -\>Space Permissions and I could see the new 'space' but its Operations were set to Recover Permissions. I clicked on the Recover Permissions and allowed myself access to it and Operations changed to Manage Permissions. The new 'space' is now visible in Spaces -\> Space Directory. I will try the 'pages' copy/move at a later date. Note I had Confluence administrator permissions.


author: AnnWorley
body: Good show! Happy you were able to import successfully.

To make matters more confusing, you can do a custom XML export from Space Tools where you choose only the pages you want to export, but they still have to be imported as a space on the destination instance, under Backup \& Restore on the Admin page. (If the destination instance already has a space with that name, it will fail.)

Please reach out with a new question if there is anything we can help with.