2

Though my current QGIS-project was not saved in that very moment, yesterday evening my Win 10 decided to run an OS-update and shutted down. 'No problem', I thought because of having installed the AutoSaver plugin, which has created the bak-file as exspected.

According to several forums just renaming the file suffix from yourfilename.qgz.bak to yourfilename.qgs should be sufficient. But, trying to load the re-suffixed file into QGIS resulted in kind of a blank project (though showing the right filename in the headline of the QGIS-Window). Comparing the autosave-bak-file with an earlier qgs-file (created by 'normal' saving) in the Editor didn't reveal any file error or corruption. So, everything seemed to be allright with the autosaved file.

I was struggling around quite a long time, not finding any answer in the web. (There is a similar thread on stackexchange: QGIS AutoSave Plugins File not Recovering. But this helped not to solve my specific issue).

As I already found the solution, I will give the answer by myself. It's not very spectacular, but maybe someone else with having the same problem will save some time and nerves.

1 Answer 1

2

Let me say first of all: The problem might only occur with Windows, even only with Win 10. I cannot judge this for other OS.

The solution - in my case - was not simply to rename the file in the Win-Explorer, but open the AutoSave-bak-file in the Win-Editor (any other editor would do it as well, I guess) and then save it by 'save as ...' (with precautionarely a new filename and) with qgs-suffix (not with txt of course).
Afterwards opening the file in QGis worked as usual, without any problems.

I am not an expert, but background seems to be: Just renaming the suffix with the Explorer will not neccessarely change the file-type information (Explorer --> right-klick on file --> properties). In my case at least, despite having renamed the file to .qgs the properties dialog showed the wrong file type: Either .qgz, .bak or .qgz.bak, - I don't remember exactly. But anyway not .qgs. So, I guess, this wrong information leads QGIS to read the file the wrong way.
However, the little Editor-detour solved this problem.

Little note for AutoSaver-filetype-beginners: Please be aware to rename the file from yourfilename.qgz.bak to yourfilename.qgs (not to yourfilename.qgz) as the bak-file is based on the qgs-format no matter which format you are basically using. This is also the reason, why the AutoSave-file is 10 or 50 times larger than the origin qgz version.

Your Answer

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

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