Hello there,
I recently found an old Gramps backup (?) from 2019. It is only a zipfile ([treename]_[timestamp].zip). It contains a database directory with a lot of files, ranging from a
bdbversion.txt (stating (5, 3, 28))
over citation.db, citation.gbkp, event.db/.gbkp, family.db/.gbkp to tag.db/.gbkp and tag_name.db.
I do not know what version of Gramps I had originally edited this tree with, but I guess it was on a Linux machine (most likely ubuntu).
Is there any way to recover the data in these files into a proper family tree? Thanks a lot in advance!
The answer is most likely yes. Is it just a group of files, or are they stored in a directory with a name containing hexadecimal digits? Or is there even a directory named grampsdb with one or more of such directories in it?
Thank you! Yes, that really sounds like it. I hope someone has an idea what can be done with this backup, since the handbook only describes the format …
In the preferences “Family Tree” tab, you have a “Family Tree Database path”.
In this directory, you restore your zip file.
Then in gramps you should see the restored database.
In this case, where you find a lot of DB files, and bdbversion.txt, there is no need to set up a VM, because it’s a BSDDB database, which is supported in all recent Gramps versions.
There may be a few hurdles sometimes, because BSDDB versions differ between Linux versions, where they depend on the distribution, and the one that we distribute with Gramps AIO is not the same, because for that one, we make our own decisions.
The consequence of this is, that sometimes, a BSDDB database made on one platform may be unreadable on another, because the BSDDB version on the receiving end is lower, and we can only upgrade to a newer version, not downgrade. This may also be the case for Python versions, which influence the pickle format sometimes, and the schema version, of course.
These things are not likely to get in the way when a database is a few years old, but you may see problems sometimes.
Further on, you must also be prepared to see an occasional message from Gramps when it has to upgrade the Python, BSDDB, and/or schema version, and in all cases, a backup is automatically made, and stored in GRAMPSHOME, I think.
Glad that you were able to recover the Gramps 3.x backup ZIP by extracting its folder into the directory folder specified by Gramps Preferences. And that it then appeared in the Manage Family Tree dialog as Serge suggested. (Thanks @SNoiraud !)
SQLite is considered more reliable and became the new standard database backend beginning with the 5.1.0 release. There is a good possibility that BSDDB will be demoted to an add-on plugin instead of a built-in in some future release. (It would help decrease the size of the basic download.)
Unfortunately, the “repair” and “convert” buttons in the manage-tree-dialogue weren’t active. So I exported, set up a new tree and imported the export. That worked well as far as I can see.
I found yet another, later backup file which seems to throw the error specified by @ennoborg - it states the pickle version doesn’t match (“unsupported pickle protocol: 5”). But I don’t think it contains any more information than the file I used, so I think I’ll skip trying to emulate a Gramps version with that pickle protocol. (Or could that be done just by upgrading Python?)
In this case, it may help to try that file on another platform. I see Windows 11 and Ubuntu in your profile, and if you can switch between both, like I can on this desktop, it may be worth a try to restore the ZIP on either platform, and see what Gramps 5.1.6 does.
For BSDDB formats, there is no guarantee that they can be shared between Ubuntu and Windows, but once converted to SQLite, you can exchange data by copying the directory, if you want, because the SQLite format is compatible. I don’t really recommend it, and always use the .gramps backup format for that, but it is a bit faster, for daredevils.
Note that the Convert button is only available when that database is not open, and the Repair button is most likely only available when Gramps sees a corruption than can be repaired, like an unfinished transaction, or something like that. And when the pickle protocol is unsupported, it is not available for repair either.