Exporting large space (> 1Go): attachments are missing
Asked by Nicolas Casel:

Hi all,

**Here is the scenario:**

On Prod:

* I do 'Space Tools / Content Tools / Export / XML / Full Export'
* (no error message during preparation of the zip file)
* I download the zip file (1,05 Go)

Then I continue on Acceptance:

* I do 'General Configuration / Backup \& Restore / Import from the home directory / Import
* (no error message during file uploading and unzipping)
* I go to the newly imported space and do: 'Space Tools / Content Tools / Attachments'
* I see that only 6 pages are present, instead of 890 pages (on Production)

I leave Confluence

I go back to my local Windows env, I open the exported zip file

I open the 'attachments' folder and see a long list of subfolders, but many are missing

Additional information: every time I run this xml export, the generated zip file does not contain the same number of folders in 'attachments'! It can be much more or less ... And the 'entities.xml' filesize is also changing: can be 300, 650 or 800 Mo


Answers:
author: Thiago Masutti
body: Hi [@Nicolas Casel](/t5/user/viewprofilepage/user-id/510185)

Based on your description, it is more likely that something on your production instance is contributing to the problem when creating the export of the Space.

How long is it taking to complete the full export?  
I'm asking this because if your export is taking several hours, it may be the case that you are hitting the bug reported in [CONFSERVER-43070](https://jira.atlassian.com/browse/CONFSERVER-43070).  
Although the whole Space export completes and the zip file is generated, the file may be corrupted since it was cleaned by this job.

You may also want to [add DEBUG](https://confluence.atlassian.com/doc/configuring-logging-181535215.html) to the following classes to get more information on what is happening during the export.  
If there's any problem, then you may get detailed information on what could be causing it.

```
com.atlassian.confluence.importexport
com.atlassian.confluence.pages.persistence.dao
```

Let us know if this helps troubleshooting the issue and if you find any additional details.

Kind regards,  
Thiago Masutti

comments: author: Nicolas Casel
body: Hi Thiago,

Thanks for your prompt feedback and the resources you provide.

After more investigation, I know now that the zip file is correctly generated at server side, because its size is much bigger than the filesize I get once download is finished. I suspect the download via web browser is not completely valid.


author: Thiago Masutti
body: Were you able to properly import the Space after downloading the file directly from the server?


author: Nicolas Casel
body: Thanks for the follow-up Thiago.

Here is the full story (in case it can be useful for other members here): yesterday, I managed to import the full space (after downloading the file directly from the server, indeed) into acceptance. There was no error message during upload and unzipping, but the space was not complete: many attachments were missing, and more surprisingly, pages existed but were empty of their contents.

Now I just did another export / import, and the space has now all its contents. So, as lessons learned:

1) downloading the (exported) zip file via web browser can bring an incomplete zip file (although i don't know the reason)

2) importing an xml zip file can create a space with missing contents, and performing another attempt can be the quickest solution


Tags: attachment

confluence-server

export

import

server