Lost all my XMP files. Recover from JPGs?

For a while, I was using the Git version of Darktable for editing, but for a variety of reasons, have recently switched back to the stable version.

Of course, my configuration was incompatible, and had to be scrapped (backed up and deleted .config/darktable).

But to my great dismay, the first import of my image archive overwrote all existing XMP files and deleted all edits. Is that intentional?

But if I remember correctly, Darktable also writes its XMP data into the exported JPGs, right? So how do I copy that data back into usable XMP files?

For single images, you can use the “load sidecar file” button in lighttable and just select the jpg file (you will need to disable the *.xmp filter in the file dialog for that).

For batch processing, exiv2 can extract the xmp file from the jpg:

exiv2 -e X filename.jpg

After renaming the output file from filename.xmp to filename.cr2.xmp, darktable correctly loaded the history from this xmp file.

3 Likes