I messed up my database and can't figure out how to get back to where I was

I keep my pictures on a network drive, about 6,000 total. Because of this I sometimes update my local thumbnail cache so I can scroll through without waiting 10 seconds for a preview to download.

I run the darktable-generate-cache script, it’s returning some SQL errors during the process. I didn’t think much of it though.

Upon opening Darktable, it says that the database is corrupt and I can either close DT, rebuild the database or delete it. I clicked on all three multiple times and kept getting the error.

So I moved the DB and library files out of the folder, renames the “snapshot” DB and library files to data.db and library.db, and restarted Darktable. It opened, but every image is a skull now, and I can’t delete any thumbnails or import any images. I am now stuck.

With the snapshot DBs, have you retried running darktable-generate-cache

I did, it finished in about a minute and I still got the skulls.

Whenever I open DT, it says I have “3 images selected”, even though I never selected any.

I just moved everything out of the folder and now it appears to be working normally.

Edit: when I try to collect images by “date taken”, the whole program crashes with no details.

I’m relatively new to dt, and had similar issues recently. My database’s would get corrupted because of unexpected crashes, so I’ve had to start doing regular backups.

Can you or someone point me to the script you are referring to? And what exactly it does and when to use it?

See darktable 3.6 user manual - darktable-generate-cache

1 Like

This is older now but I think one of the best videos made for this topic and I think still relevant…

2 Likes

Thank you pehar and priort!