How to fix corrupted database?
hopefully there are some backup databases stored in the same directory as data.db. You could try replacing data.db with the most recent backup (rename or copy the backup to data.db).
For Linux there are instructions: sqlite - How to recover a corrupt SQLite3 database? - Stack Overflow
Thank you for the direction. I will give it a try.
Hi there.
I have also had this problem.
I am however not so tech savvy to understand @elstoc’s solution.
Could somebody please help me out and break it down in simple terms?
Many thanks
What OS are you using @Sal0kin ?
Hi there, thanks for your reply.
I am running Windows 10.
The three options was not working, I deleted only the data.db file, that didn’t work. Finally, I deleted the entire darktable folder from my computer and opened the darktable app and it worked
C:\Users\UserNAME\AppData\Local\darktable
Welcome… you can also always run DT with a command line addition… if you add --configdir “path” and here path indicates a new empty folder of your choice. DT will create all new fresh config files and use that folder and now if things run better then you can start to look into your database issues before having to go nuclear and delete them… If you still have an issue then there may be other wider problems… just a tip… this is also a way to run for example a release version and a test version with advanced features at the same time on the same machine
Next time: in the directory where your library.db is stored, darktable also creates backups. I’m on Linux, but it’ll look similar on Windows or on a Mac, too:
You can always delete the corrupted file reported by darktable (data.db
in the original screenshot posted a year and a half ago), and rename one of the recent backups to replace it (such as data.db-snp-20230225152536
on my screenshot).
Please don’t resurrect old threads. If you have a question, and cannot find an answer, opening a new thread is usually the better option.