Confluence Space import failed with invalid compression method
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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
:
1
2
3
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.
Was this helpful?