darktable tags have gotten corrupted

I can’t help you with the ‘what happened’ part, but the restore part may be relatively easy: tags are saved in the database, and database files are backed up regularly (if you didn’t change that option). First thing I’d do would be to copy all database backups out from darktable’s config folder to avoid losing any of them while you analyze the solution. Then, you can start darktable with a new config folder, putting there the database files (library.db and data.db), going back one backup at a time to check were corruption happened. If you’re lucky, it happened recently and one of the backups will be OK. You can then start using them as your new database in the normal folder.

Caveats:

  • you’ll lose any edit since that backup
  • if you have both ‘xmp saving’ and ‘check for xmp changes at startup’ enabled, you should be careful with overriding the backup database with the xmp version, as the later could have the wrong tags version (you may go the extra mile and check that beforehand)
2 Likes