My laptop shut down on its own overnight and now I can’t open my family tree db in Gramps (5.1.2, Linux).
If I try to open it, gramps sees the db as locked. I break the lock, and then when I try to open it the error I see is (apologies in advance for any typos in this, I can’t seem to copy the text from the error window)
Cannot open database
Gramps has detected a problem in opening the 'environment' of the underlying Berkeley database used to store this Family Tree. The most likely cause is that the database was created with an old version of the Berkeley database program, and you are now using a new version. It is quite likely that your database has not been changed by Gramps.
If possible you should revert to your old version of Gramps and its support software; export your database to XML; close the database; then upgrade again to this version of Gramps and import the XML file in an empty Family Tree. Alternatively, it may be possible to use the Berkeley database recovery tools.
(-30973, 'BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery -- BDB1544 process-private: unable to find environment')
Notably, when I try to open my databse, the “repair” button is greyed out, so that is apparently not an option for me. I’ve tried using db5.3_recover from the command line. If I run that without “-c” the return looks like
db5.3_recover: BDB0110 Log sequence error: page LSN 1 375875; previous LSN 1 1778303
db5.3_recover: BDB1520 Recovery function for LSN 1 1778381 failed on forward pass
db5.3_recover: BDB0061 PANIC: Invalid argument
db5.3_recover: BDB0060 PANIC: fatal region error detected; run recovery
db5.3_recover: BDB3015 ~/.gramps/grampsdb/5e495d95/referenced_map.db: write failed for page 2
db5.3_recover: BDB3027 ~/.gramps/grampsdb/5e495d95/referenced_map.db: unable to flush page: 2
db5.3_recover: BDB1544 process-private: unable to find environment
db5.3_recover: DB_ENV->open: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
I also tried exporting the database using by running gramps from the command line:
$ gramps -u --open="Family Tree 1" --export=full-dump.gramps
/usr/lib/python3/dist-packages/gramps/gen/plug/_pluginreg.py:1138: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if PluginRegister.__instance is not 1:
/usr/lib/python3/dist-packages/gramps/gen/plug/_manager.py:86: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if BasePluginManager.__instance is not 1:
/usr/lib/python3/dist-packages/gramps/gui/pluginmanager.py:74: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if GuiPluginManager.__instance is not 1:
/usr/lib/python3/dist-packages/gramps/plugins/export/exportvcalendar.py:205: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if date_string is not "":
2022-10-12 20:37:27.269: WARNING: write.py: line 634: Error opening db environment: (-30973, 'BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery -- BDB1544 process-private: unable to find environment')
ERROR: Gramps has detected a problem in opening the 'environment' of the underlying Berkeley database used to store this Family Tree. The most likely cause is that the database was created with an old version of the Berkeley database program, and you are now using a new version. It is quite likely that your database has not been changed by Gramps.
If possible, you should revert to your old version of Gramps and its support software; export your database to XML; close the database; then upgrade again to this version of Gramps and import the XML file in an empty Family Tree. Alternatively, it may be possible to use the Berkeley database recovery tools.
(-30973, 'BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery -- BDB1544 process-private: unable to find environment')
Error opening the file.
Exiting...
It seems that I can’t get through this “environment” error, but I have no idea where it came from. Any suggestions would be appreciated.