How can I restore darktable edits from existing XMP sidecar files after moving to a new computer?
Asked 9/29/2020
6 views
2 answers
0
I copied my darktable photo library to a new computer, including both the original RAW files and their .xmp sidecar files, in the same folder structure as before. After installing a fresh copy of darktable, my previous edits do not appear.
I enabled the option to look for updated XMP files on startup, but it only seemed to affect one image. I suspect darktable is ignoring most sidecars because their modification dates are older than the import time in the new database.
Is there a way to restore edits for the whole library automatically by matching each XMP sidecar to its image filename, instead of applying them one by one?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
5y ago
2 Answers
2
I think your suspicion that the date of the sidecar files plays a role is correct. The manual states (bolding mine):
Look for updated xmp files on startup
Check file modification times of all XMP files on startup to find out if any got updated in the meantime by some other software. If updated XMP files are found a menu opens for the user to decide which of the XMP files to be reloaded – replacing darktable's database entries by the XMP file contents – and which of the XMP files to be overwritten by darktable's database. Activating this option also causes darktable to check for text sidecar files that have been added after import time – see option “overlay txt sidecar over zoomed images” in Section 8.1, “GUI options” (default off).
So it seems you need to have XMP files that have a modification time that is later than the last database modification time.
Roughly the steps I would have in mind would be:
- Create a copy of +/- 100 of your photos and XMP files into a separate folder
- Import the copies into darktable
- Set the "Look for updated xmp files on startup" options in darktable.
- Close darktable.
- Loop over your XMP files and touch them to update the modification time only (hence the
-moption):
for file in $(find . -name "*.xmp")
do
touch -m $file
done
- Open darktable. I expect it now to replace the database entries by the XMP file contents.
Originally by user9161. Source · Licensed CC BY-SA 4.0
user9161
5y ago
0
Generated from our catalog & community — verify before relying on it.
Yes. In darktable, the usual way to restore edits from existing sidecars is to reimport the images into a fresh database. When images are imported, darktable reads matching .xmp sidecar files automatically, so edits stored in files like IMG_1234.CR2.xmp are applied to IMG_1234.CR2.
The “look for updated XMP files on startup” option is mainly for sidecars that are newer than what darktable already knows in its database. If your new install already imported the photos first, older sidecars may not be treated as updates.
Two practical options:
- Reimport the photo folders into an empty/new darktable database so the existing sidecars are read during import.
- If nothing changed about the file locations, copy over your old darktable database instead of rebuilding it.
In short: you generally do not need to apply sidecars manually one by one; reimporting the library is the cleanest batch method.
Recommended products
UniqueBot
AI5y ago
Your Answer
Related Questions
How can I make Darktable reload updated XMP metadata from digiKam?
How can I reorganize photo folders by capture date and keep XMP sidecar files?
Can any Linux photo manager import non-destructive edits from Picasa's picasa.ini files?
How can I delete rejected photos from disk in Darktable?
Can digiKam use darktable-generated previews or sidecar JPEGs for thumbnails?