Two computers, two libraries, questions

Without knowing what’s in the library.db or the other config files, I don’t know what effect using one from two different computers would have

Craig

The configuration and operation files of darktable.pdf (183.9 KB)

Depending on what features you use and how you use DT you might not even need a library… in that case you can use --library :memory: as an option. I think it creates a temp library each time you use DT that gets deleted when you exit…so basically you rely on the xmp files and you use DT basically as an editor…

I’d like to import them into a library? which has the storage on the samba server, as well as the library.db.
Maybe using an ephemeral library with the :memory: location is a good way to go when I’m traveling

Craig

Nothing is imported just incase that is not clear…its just a database of locations and thumbs… thats why if you move things from your file system outside of DT that it gives you the skull icons.

What about keyword lists: one of the primary reasons I use dt

Craig

Keywords, title, and description are stored in the sidecar (XMP) files. I use those fields for exchange with another program through the sidecar files.

The other fields from “metadata editor” in lighttable view are probably stored there as well, but I never use those.

Because of my english is very simple You should know my understanding of Your problem is not exact.

This is my entry placed in shortcut ““C:\Program Files\darktable\bin\darktable.exe” --configdir C:\Users\darek\SynologyDrive\darktable”

Each of my 3 Windows computers has this line.

I use Synology Drive for syncing info between computers which is similar to Dropbox.
Each time when info in each config file is changing it is immediately syncronized with files on my Synology Drive and when I run another computer these files are syncing with this computer (of course I have to wait moment for syncing is ready).

This causes all config files on each computer are up to date.

Darek

1 Like

Hi Todd, could you explain how to do this a bit more. The reason is that with LR I could put a database (catalog in LR speak) on each of my external backup drives and use this to import only new images from my working computer. If I could work out how to do something similar with DT this would be great for backing up purposes.

Terry don’t LR datABases actually import the images?? The dark table database is merely an indexer… so you can have one pool of images and more than one database… So maybe personal and work or any combination… others would say you could just tag or filter from one database…

I feel both DT and LR databases (catalogs) are very similar. The difference with LR is that in the user interface you have the option to ask it to open a specific catalog. But your suggestion of using different shortcuts to open different databases sounds like what I would want. I must experiment with this idea. Any helpful advice or experience would be appreciated.

Indeed, keywords for a particular image are stored in the xmp file for that image. However, I have a list of over 3000 hierarchical keywords that I use for tagging photos of plants, and I want that list available when I’m culling and tagging my photos. I’d also like to have presets and styles at hand. A little sleuthing tells me that the data.db SQLITE database in the installation folder contains that information. @DarekK is on the right track and closest to what I’d like to do with a minimum of effort.
Similar sleuthing on the library.db file tells me that the library.db contains info on the modifications done to each image, along with the image metadata, probably all things that could be recreated from the xmp file, but allowing quicker access.

So, I think what I want to know is: how do I share these files: data.db and darktablerc ?
I can’t tell from the docs what --datadir and --configdir refer to on Windows, or if they’re even the right options.

This isn’t quite what I need: I would be creating new images on the laptop and then adding them to the home library.

These are command line switches that at run time direct DT where to look for those files…

I just use it to run more than one version for DT…keeps everything separated. Even my main version I run from a folder in C drive called DTconfig instead of tucked away in the appdata folder. Just makes it easier to find and back up. I really don’t make use of any of the database functions… I currently am using one but for a long time I just used the :memory: option… I do have a shortcut still to run that way if I so choose… in the end those command line switches are pointers… you can locate and try to keep things in sync within that framework… I am sure you can do a small test case with a subset of folders to see how you can make it work or not…

That was the question: what are the command line switches to control that

Craig

Not sure if you have it or not…

datadir to locate your data.db
library to locate your library.db
configdir to point to a folder that would have all the config files including data.db and library… unless you use the ones above in addition to locate them else where…

https://docs.darktable.org/usermanual/4.0/en/special-topics/program-invocation/darktable/

I read that and it did not mention either data.db or darktablerc, nor did it reference the relevant Windows directories so I was unable to come to decide what to use

Craig

You’ll correct me if I’m wrong, but what I gather so far is:

  • you want a separate installation on a laptop, where you can download new photos to the laptop and work on them;
  • on the laptop, you want the same configuration as on the main system, including a list of all available/predefined tags, styles, and presets;
  • the downloaded photos must then be transferred to another system, with any changes (including metadata) transferred as well;
  • you want to be able to use the main system’s library from the laptop when at home, in addition to the library local to the laptop.

The last point is the tricky one. As far as I know, dt can only access one library from a given instance, and can’t merge two libraries. So I’m going to ignore that point

For the first three:
you know where the database files are located (as you examined them), so you can transfer the data.db manually (not sure if that works, see below for an alternative).
Same for the darktablerc file, copying this should work, apart from some history directories and such (those not existing isn’t an error).
If you have user-defined short-cuts, you may want to copy the shortcutsrc file as well.

Once that is done, you should have access to all the tags, styles and presets you defined for the main system. You will have to manually ensure that the laptop version stays sync’ed with the main system

Then you would need two shortcuts to start dt:

  • one for “on-the-road” use, which uses a local library (I’d go with “–library :memory:”);
  • one for “home” use, where you use the shared library (“-library <path>”).
    You could use the default location for the image library on the laptop, but as the images on the laptop change often, that would need regular cleanup. Downside of “–library :memory:” is that you have to re-import at every dt session.

Under linux, it might be possible to use a shell script to decide which of those two to use, depending on whether the main library is visible. Not sure if this is possible under windows.

To transfer metadata and edits, I’d make sure sidecars are always written, and I’d transfer the images manually from the laptop to the main system, followed by an import (“add to library”) to get the images in the main library.
Make sure to transfer the sidecars as well… (easy for me: I use the “when shot” date to organise the raw files in directories, so I could just transfer the full directories from the laptop to the main system).

If you don’t want to copy the data.db file, you could try to create a “dummy” image with all tags attached and import that image on the laptop installation. This would use the sidecar to store the tag tree. User-defined presets and styles can be exported from one machine, and then be imported on another installation.


If all of the above does not correspond to what you want, please state as precisely as possible what you want to achieve. We seem to have some problems in understanding your use case.

Dt has “copy locally” functionality (that I don’t use and know little about) that might do this kind of thing?

Here’s what I’m going to try for a while:

  • Copy data.db, darktablerc, and library.db f rom config directory in $(USER)/AppData/Local/darktable to samba share, z:\photos\dt-config
  • when at home on either desktop or laptop, start darktable with a shortcut and args:
    darktable.exe --configdir z:\photos\dt-config --library z:\photos\dt_config\library
    Although it looks like the --library option is not necessary - not sure yet. Note that --datadir is not the correct option.
  • I’ll also copy the data.db to my laptop config directory before disconnecting from lan. This will give me any updated tags.
  • When using laptop disconnected I’ll start it with a shortcut like this:
    darktable.exe --library :memory:
    Using the default user config directory
  • Then, when back at home, start laptop using the shared dt-config shortcut, and import any new photos, with dt configured to read xmp files on import. I’m hoping this will also update the shared data.db with any new tags.

Thanks for all the suggestions. I’ll report back if there are issues with this workflow.

1 Like