Windows 11, Gramps v AIO64-5.1.6
New computer, trying to import .gpkg backup file. I get a message, “database is locked use the force-unlock option” I do not see that option. How do I unlock this backup file?
At times I get this message: "Media directory c:\users\bpoli\Bowman Wishart v5_0_1-1_2023-11-01.gpkg.media exists. Delete it first, then restart the import process. I’ve deleted that and it didn’t help
On my old computer, and hence my backups, I included ‘Media’. I did get one old b/u to load which doesn’t have any media, it that maybe the issue?
The “database is locked” indicates that sometimes you are not exiting Gramps properly. (Such as launching the Console version of Gramps and closing the console window instead of the Gramps window. Or you killed the Gramps task with the Task Manager… or had a crash.) The following thread describes the unlocking process:
Just did some experiments. (Set up a fresh Windows 10 and installed Gramps. Then imported a .gpkg made on a different machine with a different username.)
I started out trying to restore from the .gpkg file by opening the archive with the grampsw.exe application.
But I was impatient. It didn’t look like anything was happening. So after killing the instance of Gramps. Trying again made Windows complain that Gramps was still running. So I killed that with Task Manager. And found myself in the same situation you described… with a Locked tree and a “media” directory that already existed.
Does that sound similar to what happened to you?
So, just to be safe, I restarted the Windows box. And then moved that “Media Directory” folder to the desktop. (It had the decompressed data.gramps tree file and a whole decompressed hierarchy of folders containing the various media objects.)
After unlocking and deleting the 1st Tree attempt, I tried again. This time, I tried opening the .gpkg file again but used the gramps.exe instead of the grampsw.exe application.
And I let the import run this time. Just walked away instead of sitting & watching the pot waiting for it to boil. (The tree has 42,000 people but not many Media Objects.) And Gramps somehow completed the import without my micro-managing.
Now all the media objects are there. But they were restored with that entire hierarchy under the default user’s Pictures folder. That’s ugly mess even with only a couple dozen media objects. I’m unsure how to de-complicate it too.
I don’t use Media Objects in Gramps. So maybe someone else can pick up the thread?
Resolved…for the most part. From my Laptop, looked up the older Gramps version I used there, AIO64-5.1.5-1. Went to sourceforge.net and that file was listed and it worked. The media is also there but in a totally different directory.
Thanks to all who posted suggestions.
DavidM Straub: What category should I have it in? That would be a big help.
It was originally posted to the “Gramps Web” category … which is the server-based fork that David created. All the rest categories of this Forum is about the main fork of Gramps for personal computers.