How to recover tree after crash: possible workarounds?

Hi, I found myself in a very similar situation to what user @gattinarubia reported some months ago here: after hybernation of my Windows 11 system, reopening Gramps (5.2.0) showed my tree as “locked”, and when I tried to re-open it all the 10+ hours of work were gone.
I was quite angry with my system, so I just shut it down.

Today I reopened Gramps and to my surprise found my tree locked again (even if I had forced it open last time). Since it showed a local temporary folder, I decided to check there if there was any hope of recovering my data.

In the folder “C:\Users[…]\AppData\Local\gramps\grampsdb\66ce2103” I found a file named sqlite.db: opening it with Notepad I found some surnames that I had added only during the critical time before the lock-up (no person with such surnames were present before)! Thus, it is probably possible to restore my tree at the end of my last session, the point being: how can I do it? I am an experienced windows user, but have no experience in handling .db files.

Here is a screenshot of my folder content:
image

File “lock” contains the name of my user and PC
File “meta_data.db” is empty
File “sqlite.db” contains what I believe is the tree data, partially encrypted
File “database.txt” contains just “sqlite”, probably referencing sqlite.db
File “name.txt” contains the tree name

Any advice on how to proceed?

Update: I have tried to duplicate the folder “66ce2103” inside “AppData\Local\gramps\grampsdb\66ce2103” (simple copy+paste). In the copied folder, I deleted the “lock” file and now it seems to work perfectly, with all of my data correctly recovered.

Feel free to add any suggestion or correction to make this process smoother, but it feels as if I’m in love right now. Thanks!

I did two experiments here, with Windows 10 and 11, and when I hibernate either, with Grramps running, with a tree open too, it reappears on wake-up, and can I continue working on that.

Lock files are only left when Gramps crashes while the database is open, or when you shut down or restart Windows without closing Gramps, or the tree. And here, Gramps will allways remove them when I follow the standard procedure as described here:

https://www.gramps-project.org/wiki/index.php/Gramps_5.2_Wiki_Manual_-_Manage_Family_Trees#Unlocking_a_Family_Tree

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.