Problem with multiple paths to same image

Hi everyone!

Been lurking on the forum for while but have not posted anything yet but now I feel that some help from the hive mind would be useful.

Currently I’m keeping all my images on an external hard drive (to save space on my laptop) and this has been working well. At some points where I have been away from my hard drive I have stored images on my laptop as temporary storage until I could offload them to the hard drive.

When I first got this hard drive I set an automatic link from the default mount point of “/media/user/hard_drive” (running ubuntu on my laptop) to “/home/user/Pictures/hard_drive”. And until recently this wasn’t a problem until I imported some images to darktable, saw some older images I thought were imported but didn’t appear so in the list and thought “hey these images are not imported” and imported them. As a result I now have an irritating problem:

I now have images on the following paths

  • Only on “/media/user/hard_drive”
  • Only on “/home/user/Pictures/hard_drive”
  • On both of these places (i.e. in darktable as both “/media/user/hard_drive/date/image” and “/home/user/Pictures/hard_drive/date/image”)

What’s interesting is that although darktable is pointed at the same image in two ways (and hence the same xmp-file as far as I have understood it) making changes in one copy is not reflected in the other even after a restart of darktable.

What I would like to do is to consolidate this to a single path in darktable and since the images are physically all in the right place there seems like it should only be an issue of pointing darktable to the correct path. Is there a clean way to solve this?

I hope this hasn’t been asked before; there are some somewhat relevant threads ( Relative paths in darktable library - #2 by priort , Ideas for "Darktable" Cloud and Sync (local and over the internet) - #10 by priort ) but I don’t feel they help me much currently.

I know where my database is but have no experience dealing with sqlite databases.

Thank you in advance for any help. :slight_smile:

I’d suggest that you clean up the mess, and each image in the DB only once.
The trouble is that in the DB there are two entries, each with a different history. Darktable has no way of knowing that those images are the same.
Normally, darktable only reads the sidecars on import. Thereafter, they become write only (basically, backups of the DB).
You can change that behaviour in the preferences (‘look for updated xmp files on startup’); that way, darktable will, on startup, read the XMP and update the DB, so changes made to one ‘DB instance’, saved to the XMP, will be read when you restart darktable, and will be applied to all DB instances.