Relative paths in darktable library

I’m currently moving my workflow from Lightroom to Darktable. I used to have my entire Lightroom library on an external drive, so I could move between multiple computers.

In my darktablerc, I found the option to configure the library path:

database=/media/Seagate/Pictures/Darktable/library.db

This works nicely, however the library itself stores filmroll paths as absolute paths.

$ sqlite3 library.db 'select * from film_rolls;'
1|1607896925|/media/Seagate/Pictures/2020/2020.12.13 - Ricken Schneeschuhe

Is there a way to solve this, e.g. by specifying a root directory in the darktablerc and storing filmroll paths relative to that in the library?

(If I’m sharing the library between two Linux computers, I can ensure that the mount path stays the same, but that won’t work when moving between a Linux and a Windows machine.)

1 Like

If you are on the same OS then symlinks work so that DT thinks the location is the same. Not sure moving between OS with the different files systems…I do move between computers but I don’t bother with a library. I start DT with the Memory option so a temp virtual library for that session that gets erased and I just rely on the xmp files for what I need. Your situation might be what the local sync is in place to try to handle but again not sure about this between OS?? https://www.darktable.org/usermanual/en/local_copies.html

Maybe some tips in here…esp comment 16… Ideas for "Darktable" Cloud and Sync (local and over the internet) - #17 by da-phil

Thanks @priort. Symlinks work for Linux (and macOS), but not when sharing a library with Windows. I’d like to be able to share the list of filmrolls as well as tags between multiple computers, if possible.

I wonder if it would be possible to specify a root directory in darktablerc, and then store filmroll paths relative to that if the filmroll path is a subdirectory of the root directory.

If something like that isn’t possible yet, I might try to come up with a pull request containing this functionality. However, first ist would be good to hear the thoughts of a developer. Do DT developers frequent this forum?

I’d recommend having the database.on yournlocal machine, not on the external storage. Everything will be faster that way.

If you use the preference “check for new xmp filed on start up”, then you can update the database of each machine you work at.