A couple of years ago I reinstalled my computer with openSUSE Leap 15.2, and more recently I installed gramps 5.1.3. It finds a BSDDB database, but when I try to open it, it says (Yuck, I can’t copy it and have to retype by hand!)
The Family Tree you are trying to load is in the Bsddb version (5, 3, 28) format. This version of Gramps uses Bsddb version (4, 8, 30). So you are trying to load data created in a newer format into an older program, and this is bound to fail.
You should start your newer version of Gramps and make a backup of your Family Tree. You can then import this backup into this version of Gramps.
I don’t believe this. The current version of Gramps is 5.1.4, which wasn’t released when I last touched the family tree database (2018). I think it wants an older version of Gramps, even though the bsddb version number appears newer.
Can anyone tell me which version of Gramps will read this database, and where I can get an installable copy?
Are you sure it said BSDDB throughout? The 5.1.4 version of Gramps defaults to SQLite which is at version 3.21.0 on my Windoze version. I can go into preferences (“Family Tree” tab) and choose BSDDB again as the database backend … which is at the 6.1.0 version.
If you are trying to open an old database version, Gramps added database backend option in the 5.0 version. So 4.x.x & earlier versions will not have a “database.txt” file in the grampsdb subfolder. That file confirms in plain text which database backend is in use.
Which version of Gramps did you initially use in openSUSE Leap 15.2? There’s usually a gramps51 for 5.1.x version Plugins or gramps42 for 4.2.x version Plugins in the same User Directory as the grampsdb subfolder.
Worst case, we should be able to use an old version of Gramps to recover the database.
But the backups are all in .gramps or .gpkg files. Those are compressed XML format … which is more stable & portable than any database engine .db format file. (Because attempting to open a database file will cause the engine to UPDATE the file to meet current standards and to update the audit trail. So if you touch a .db file with the wrong version, tools or engine; you can mangle it instantly. This is true of virtually all databases.)
So the preferred thing is to import one of those backup files into a fresh, blank Tree when updating Gramps. This ensures the cleanest possible database structure.
The error message about the bsddb is about the bsddb version, which is not part of Gramps, but one of the prerequisite libraries installed in your Linux system. Apparently when Gramps was last used the bsddb version on the system at the time was version (5,3,8), which means that the data was saved in that version’s format. But now the bsddb version found was (4, 8, 30), which is designed to NOT open newer format databases in case some incompatibility caused database corruption. To open your old database you will have to use the Linux tools to update the bsddb to 5.3.8 or newer.
According to YaST2, the version of the Berkeley DB database that I have installed is 5.3.28, same as in the message. This is also the version in bdbversion.txt in the .gramps/grampsdb/5afc7ff2 directory. The problem seems to be that Gramps is expecting an earlier version (4.8.30).
It isn’t true of sqlite, the database that I normally use. sqlite goes to some lengths to ensure that newer versions can open older version databases, and that as far as possible new features will just be ignored by older versions of sqlite. Of course if you actually modify a newer version sqlite database using an older version sqlite library, information associated with the newer features will be lost, but the database doesn’t get mangled.
In any case it doesn’t appear that my database has been touched: all the files are dated 2018, which is before I installed a new linux distro.
6.2.6 is the version of python3-bsddb3 which I have installed. It seems to be loading Berkeley DB 4.8.30 (which I also have installed) instead of Berkeley DB 5.3.28. I can’t remove Berkeley DB 4.8.30, because that would break a whole lot of other things. So somehow I need to make Python load Berkeley DB 5.3.28.
I googled around a bit to see if there is a solution to having multiple versions of the Berkeley Db installed. I have no way to test this but some users have suggested to create a program specific PATH that ensures that the path to the newer version is found first. For example if your newer BDB is found at /usr/local/BerkeleyDB.5.3/bin, put that at the top of your PATH environment variable prior to running Gramps in the same terminal. Or export it if that won’t mess up other parts of your system. Or make a small script that does this to start Gramps.