Merge digiKam DBs from different devices

My scenario:

  • My main PC has my main photo collection, managed by digiKam (or, well, I started building a DB in digiKam, tagging photos etc…)
  • When I’m traveling and taking pictures, I’ve lately been trying to process them on my laptop during downtime, rather than coming back from a vacation with a huge load of photos and no time to process all the raws. This includes tagging all the photos in digiKam, and processing some of them.
  • When I get home, I’d like to then be able to merge the new batch of photos into the main collection on my PC

So: What is the most straightforward way to move over the new photos, without losing any of the work I’ve done on the laptop to organize them? The file structure is identical on both machines, but as I understand it, digiKam does not (and cannot) store my added metadata in raw files, so this info exists only in the database (i.e. “write metadata to image files” won’t help). Ideally, I’d like digiKam on my PC to ingest both the new pictures and related DB entries from the laptop (via sftp/rsync … whatever, they’re both running Linux), in one go, but I haven’t found a way to do this.
I guess I could have digiKam write all metadata to sidecar files, but then it would be creating an .xmp file for each image file, and I’m not sure if that might interfere with some of the existing .xmp files from Darktable (which I would really not like to lose), plus I like the fact that I can tell if I worked on something with DT based on the (non-)existence of .xmp sidecar files.

Bonus question: If I have two different machines which partially host the same photo, and I add some information on one of them, is there a way to merge that information across?

I’d use the sidecar files for that: have Digikam write .xmp files, then copy both the raw and the .xmp from the laptop to your main computer (as long as you put both in the same directory, this works even when the two computers have a different directory structure). You may have to tell digikam on the main machine to look for new images.

I prefer not to mess with the database directly, as an error could make me lose the whole database…

For syncing over different machines: I’d again use sidecars for that: you can copy the changed sidecar files to the other machine and tell digikam to re-read the metadata for those images. Afaik, that is not done automatically.

To be safe, I do all such copying operations while digikam is not running.