It is the second time in a week that have lost the information in the project file (.qgs). When I load the project the only informationI see is the groups in the layers panel, but no layers.

I have no idea what went wrong, inspecting the .qgs file I see that all my layers, coniguration layers, data sources and a lot more are there (20k lines !!). My guess is that something could have gone wrong with some virtual layers, so I think I could get ride of them, but how?

I wonder if there is a way to retrieve some data and info in order to setup the project again from the .qgs file to build a project brick by brick and not start from zero.

System information: Windows 7 Enterprise, QGIS version 2.18.14


I tried to use the .qgs~, but the problem persisted

  • I had the same problem for two times: "...the only information I see is the groups in the layers panel, but no layers"!. As you said, I think there could be an issue with Virtual Layers. I didn't know about the "~" file so I had to update an old backup file and had to insert a lot of missing layers. I'm using QGIS 2.18.10 Windows 7 64bit. Is there a bug?
    – Stefan
    Feb 1, 2018 at 9:21
  • did you name your memory layers in a certain manner? or are they all just called "temporary layer"
    – LaughU
    Feb 1, 2018 at 9:32
  • All of them have a specific name and it is human readable
    – Marco
    Feb 1, 2018 at 9:39
  • I managed to copy and paste some blocks from the .qgs file to get the key layers back, but is far from optimal. I also learned there the way to the specifications is hard gis.stackexchange.com/questions/32340/…
    – Marco
    Feb 1, 2018 at 11:47
  • on windows 7 there is an option to restore previous versions of files support.microsoft.com/en-ca/help/17119/…
    – Mapperz
    Feb 1, 2018 at 17:25

1 Answer 1


When saving a QGIS project and altering a layer (removing or adding one) will create an additional file with the same name but a "~" at the end (see image). By removing the "~" you can restore a project to its original state when it was last altered.

example of QGIS project file.

I've tested this approach with a memory layer which resulted in the layer being present but the geometries were lost (Layer was empty) while other Layers (PostGIS) had all the geometries.

  • As updated in the question, I tried it without success. It was the first thing I did taking care of keeping the broken file as in their original states
    – Marco
    Feb 1, 2018 at 9:41

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.