Location darktable library

Is there a way to locate the DT library on an external drive for example ?
Thanks.

Yes, you can launch darktable from the CLI:

darktable --library <library file>

See the user’s guide for more detail. There are several switches.

If you want to put this in your menu, make a .desktop file and place it in the appropriate location in ~/.configfor your desktop environment.

1 Like

Or just edit the database key in the config file ~/.config/darktable/darktablerc. For an overview over all the settings in there you should have a look at share/doc/darktable/darktablerc.html in your dt installation.

2 Likes

Any of the above will work great, you could also try symlinks: I’m using that to have my data.db file saved in another folder (so I have it synced between machines).

Could you indicate which line I have to modify inside darktablerc, please ? Or elsewhere ?
Thanks

As I wrote, you have to change the database key, i.e., the line starting with database= – by default its value is library.db but you can also put any absolute path there.

Ok, got it. Thanks a lot !

Does this also means that if I back-up Library.db and on a re-install I copy back library.db to my computer, I have all my collections, image-changes and ratings back ?

You have everything back iff you also back up data.db and keep the folder structure the same so darktable will find the images. I’d still backup the xmp files as databases can get corrupted. It never happened to me, but there were reports.

Thanks. My files (and thus the Xmp-files) are already on an external drive that is back-upped constantly.