Trying to recover an old Tree with only a zipfile

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?

The separate .db files for each table sounds like what is described in the Gramps 3.0 automatic backup file.

@SNoiraud has restored a lot of unknown version datasets. Maybe he can suggest which Gramps version to set up in a VM to try recovery.

1 Like

Thanks for your reply! The .zip contains a directory named 5894bb70, which contains said files.

Here’s a listing:

Summary

bdbversion.txt
citation.db
citation.gbkp
citation_id.db
event.db
event.gbkp
event_id.db
family.db
family.gbkp
family_id.db
lock
log.0000000002
media.db
media.gbkp
media_id.db
meta_data.db
meta_data.gbkp
name.txt
name_group.db
note.db
note.gbkp
note_id.db
person.db
person.gbkp
person_id.db
pickleupgrade.txt
place.db
place.gbkp
place_id.db
place_parent.db
primary_map.db
pythonversion.txt
referenced_map.db
reference_map.db
repo.db
repo.gbkp
repo_id.db
schemaversion.txt
source.db
source.gbkp
source_id.db
surnames.db
tag.db
tag.gbkp
tag_name.db

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.

Hope it solves your problem.

1 Like

Thank you very much, it worked by just copying the individual files from the zipped Backup into the newly generated database directory!

2 Likes

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 !)

There is a recommendation in 5.1.x to convert any legacy BSDDB database trees to the new default SQLite database. This conversion can be performed in the Manage Family Tree dialog.

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?)

Anyways, thank you all for your help!

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.

1 Like

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