I just noticed there are several images in a particular library where I have lost my edits (the edit history is reset to default). It’s as if I just imported these images for the first time although my star ratings were preserved. This doesn’t represent too much lost work, but I’m trying to understand how it could have happened so I can avoid this in the future.
One culprit is that I reorganized my folder structure at one point and I believe I reimported the images in this particular folder afterwards (since the file locations changed). Based on my understanding of this page in the manual what may have happened is that when I reimported the files, darktable saw these images as new and created a new database entry for them and then overwrote the sidecar file that contained my edits.
Is my understanding correct? And how would I avoid this in the future?
For reference, my database/sidecar settings are the defaults:
I don’t think so: XMPs are included in the import. If you have several XMPs for an image (because you created duplicates), you’ll get all the duplicates back. The manual agrees:
If an image is subsequently re-imported, the database will be updated from the contents of its XMP file.
This assumes, of course, that you moved the XMP files along with the images.
If you did not:
Yes, I thought you’d do that. I’ve never had this kind of data loss. Do you have backups? I use daily dirvish backups. It’s a low-tech tool that just symlinks unchanged files, so it’s fast and storage efficient (it would only create new copies of the small sidecars, if I edit something, but not the images). Restoring something is the matter of copying it from the directory tree maintained by dirvish.
I think the issue is that you used the Copy & Import instead of Add to Library.
Copy & Import copies the raw from the original location to the new location. Because it is a new image, it then creates an xmp for it. In my opinion, only use Copy & Import to go from camera card to PC.
If you use Add to library, it will read the xmp and keep it.
@g-man good call, that could have been in it. i was having some issues importing files when I was getting started so I might have done that by mistake.
@kofa I do have a backup service so I’ll check to see if I can recover the sidecar files. If not, it’s not too much lost work. I just wanted to make sure I wasn’t doing something stupid that would cause it again.
An update for anyone who has a similar issue and comes across this topic - I was able to restore my edits after I found the old version of my xmp file (the one that had the edits and was overwritten by mistake) in my backup drive.
I just had to overwrite the xmp file in the photo folder with the backed up xmp file and then reimport the image in darktable and the edits show up.