I saved my QGIS project as a .qgz file and then my computer crashed (however I can't confirm that the saving had completed successfully). After restarting the computer, however, the .qgz archive no longer works and crashes QGIS when I try and load it.

The QGIS desktop window begins with the ~"Loading project:" project tracker with the green bar in the bottom panel but stops immediately and freezes the program to the "crash report" window.

If I try and open the archive with 7zip I get an error message "Can not open file '...' as archive".

Is there any way to access or repair information from a .qgz file/archive?

alternatively ... does QGIS save a backup of the archive or just the project file on the computer somewhere similar to the .qgs~ file in the old system?

I get the QGIS crash report shown below:

Stack Trace

zip_source_function_create :
zip_source_function_create :
QgsZipUtils::unzip :
QgsProjectArchive::unzip :
QgsProject::unzip :
QgsProject::read :
QgisApp::addProject :
QgisApp::openProject :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Version: 3.2.2-Bonn
QGIS code revision: 26842169e9
Compiled against Qt: 5.9.2
Running against Qt: 5.9.2
Compiled against GDAL: 2.2.4
Running against GDAL: 2.2.4

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 6.1.7601

1 Answer 1


You should try attacking it with a zip file recovery tool.

I just tried corrupting a QGZ by deleting a few bytes at the end. QGIS crashed (this should possibly be submitted as a bug report so that it can catch corrupt QGZ files). zip can't extract it.

But doing zip -FF project.qgz --out fix.zip produced a fix.zip which contained a project.qgs - that had some of the layer info but was still quite corrupted and QGIS wouldn't load it. Depending on what's in your project file you might have some success. I used zip on the Linux command line, you might find zip repair tools for your operating system elsewhere.

I don't see any backups of QGZ files being made by QGIS. Some time ago I wrote a plugin that saved a backup at regular intervals for a much earlier version of QGIS, there is this one: https://plugins.qgis.org/plugins/autoSaver/ now which might save you in future.

Tip: rename project.qgz to project.zip so that tools can find it.

  • Thanks mate. Will try some more along these lines. Unfortunately the first windows program I used, after renaming to zip, thought there was no files in there even though the file I have's listed as 165kb which, on reflection, is probably too small to be of value anyway. So I should probably just start recreating it now instead of wasting more time desperately hoping I don't have to. Only 2 days work plus 1 trying to fix it lost! Seems a pretty big problem that, even if I did crash the PC whilst saving (though pretty sure I didn't), QGIS didn't preserve the old one till the new one was created.
    – guestagain
    Commented Aug 24, 2018 at 9:15
  • I just installed autosaver. Great idea, but where does it place the backup .qgz?
    – Stu Smith
    Commented Jan 8, 2019 at 6:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.