Darktable Upgrade failed - Migration of old library.db / config not working

Hi everyone,

Had Darktable 2.6.3 running under Linux Mint 16.04. Used to launch DT with a parameter --library to my library.db.

Now I installed a new Linux Mint (18.04) in parallel and wanted to migrate my Darktable images.

1.) Installed current version 3.x, copied old .config-dir and library.db → not working. The library is apparently being migrated during startup, a new library file with a different size and a backup of the old file are created. But DT is not starting afterwards.
2.) Then built version 2.6.3 on the new system, copied .config-dir and library.db → DT is starting, images are shown. But any import of new images resutls in DT crashing with the error
“darktable[4403]: segfault at 0 ip 0000000000000000 sp 00007ffe0dd33de8 error 14 in darktable[55e76e824000+1000]”
3.) Built version 2.6.3 on the new system, NOT copying .config-dir will let me import images without DT crashing.

Any ideas how to get my old library back without importing 50k images again?

Your old library is there, you just need to name it correctly. DT makes a backup copy of it before doing the 3.x upgrade of the db. The database is not backward compatible.

Oh I was unclear about that. Yeah, I got both files. But I’d like to run DT on my new system with the old library, which is not working, see 1.)
So currently I have no idea how to get 3.x running with my library from the old system. Or even 2.6.3 running and being able to import new images.

2.6.x, use the old library.db and data.db.

If you want 3.x, you need to start from the old dB’s, start darktable with the -d all option and see if you can figure out why the db upgrade fails.

The databases are sqlite, so you could also use sqlite tools to try and see what is wrong.

1 Like

Thank you for the advice on debugging. Could identify a permission issue with the library.db file, fixed it and the database migrated properly afterwards. :relaxed:

[memory] at startup
[memory] max address space (vmpeak):      373396 kB
[memory] cur address space (vmsize):      373396 kB
[memory] max used memory   (vmhwm ):       21924 kB
[memory] cur used memory   (vmrss ):       21924 kB
[init] can't create `masks_history` table
[init]   attempt to write a readonly database
[init] database `library.db' couldn't be upgraded from version 17 to 21. aborting
ERROR : cannot open database
1 Like