Is there any way to recover data when a .qgz file will not open?









up vote
4
down vote

favorite












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 Info
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









share|improve this question



























    up vote
    4
    down vote

    favorite












    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 Info
    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









    share|improve this question

























      up vote
      4
      down vote

      favorite









      up vote
      4
      down vote

      favorite











      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 Info
      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









      share|improve this question















      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 Info
      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






      qgis qgis-3.2 archiving data-backup qgz






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 26 at 22:14









      csk

      6,730733




      6,730733










      asked Aug 24 at 7:10









      guestagain

      265114




      265114




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          7
          down vote













          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.






          share|improve this answer




















          • 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
            Aug 24 at 9:15










          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "79"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f293849%2fis-there-any-way-to-recover-data-when-a-qgz-file-will-not-open%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          7
          down vote













          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.






          share|improve this answer




















          • 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
            Aug 24 at 9:15














          up vote
          7
          down vote













          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.






          share|improve this answer




















          • 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
            Aug 24 at 9:15












          up vote
          7
          down vote










          up vote
          7
          down vote









          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.






          share|improve this answer












          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.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 24 at 8:01









          Spacedman

          22.3k23449




          22.3k23449











          • 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
            Aug 24 at 9:15
















          • 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
            Aug 24 at 9:15















          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
          Aug 24 at 9:15




          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
          Aug 24 at 9:15

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f293849%2fis-there-any-way-to-recover-data-when-a-qgz-file-will-not-open%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

          Edmonton

          Crossroads (UK TV series)