Confluence Space import failed with invalid compression method

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Space import failed with Error unzipping the file (This may be due to a large zip file): invalid compression method

Diagnosis

The following ERROR appears in the <confluence-home>/atlassian-confluence.log:

2021-01-11 12:46:37,296 ERROR [http-nio-8090-exec-1] [confluence.importexport.impl.ExportDescriptor] readExportDescriptor Error determining export type from export zip: /opt/data/application-data/confluence/restore/space-export.zip
 -- referer: http://localhost:8090/admin/backup.action | url: /admin/restore-local-file.action | traceId: e2506a6398b29f52 | userName: admin | action: restore-local-file
java.util.zip.ZipException: invalid compression method


Cause

It seems that Confluence was failed to open the zip file with the bundled gzip class, which can be caused by:

  • The zip file was corrupted during the transfer.
  • The compression method using was not supported by gzip.


Solution

  • Ensure that the XML backup is valid and not corrupted. It should contain at least the following two files:
    • exportDescriptor.properties
    • entities.xml
       Please select the above files directly and zip them up so that they would be at the root of the zip file when compressed. These files should not be located in a sub-folder when it's zipped up, otherwise, Confluence will not be able to find the files during the XML restore.
  • Do not use Windows ZIP compression to compress the XML backup. Use 7Zip or WinZip instead.


Last modified on May 27, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.