In the event that I need to start again (for example, after pathological disk failure) I think I am covered because I make session (or daily) backups of my images, their XMPs and darktable’s *.db and .db-snp files. But exactly how should I go about recovery? Is the following procedure effective?
-
Having got to the stage of having usable hardware, and a re-installed/configured OS then download and install the release of darktable in use at the point of failure.
-
(1st option) Do not, at this time, overwrite the just created *.db files with those from the backup.
-
(Alternative 1) Outside of dt (which may or may not be running) copy the images and associated XMPS from backup and paste into the original file hierarchy under the $(PICTURES) root.
-
Open dt (if not already open) and choose Import/Add to Library, judiciously importing images recursively down each branch of the image hierarchy, from the root, ensuing not to import too many images at once.
This immediately raises the question in my mind of what dt will do with the XMPS. My reading of the 3.8.0 manual says the default is that on import dt will create an XMP for each imported image. The manual does not state what will happen if an XMP already exists; it states:
“The “add to library” process simply adds details of those images to darktable’s library database (and creates an XMP sidecar file if applicable) allowing the images to be viewed and developed.”
Am I correct to assume that dt will give precedence to any existing dt-created XMP (and overwrite any that might have been produced by other software which used the same file naming construct as dt)? If this is not correct and dt overwrites the existing, ex-backup, XMP on input, how is the history to be added to the database?
Alternative 2 to step 3, and 4, above does nothing in step 3. In step 4 dt is opened and the Import/Copy & Import option is used, identifying the ‘places & folders’ in the backup media as per the manual. But this again raises the question about how existing XMPs are handled. The manual states:
“This option copies images from another location on your filesystem (including mounted storage devices) and then adds the copied images to the darktable library.”
If I instead I choose Option 2 to step 2 above, which is to overwrite the just-created *.db files with those from the backup (assuming that care has been taken to ensure the just installed dt and the backups are at the same version level), then do I need to worry about the XMP files at all? Or are they totally ignored in the ‘add to library’ or ‘copy and import’ options of Import?
With either import option, trying to reconstruct an image portfolio (with perhaps tens of thousands of images and hundreds to thousands of folders), is the ‘overwrite *.db files from backup’ the recommended way of recovery?
Is there any difference in approach between a Windows install and a Linux install