Sync database with exernally edited library
I'm unable to use darktable at the moment because my library is stored on an external drive which I use to edit my photos on multiple computers. I thought that since all the data is stored on the xmp file it would be easy but the databases not being synched really make this difficult. Enabling "look for updated xmps on startup" somewhat helps but it still doesn't work.
Deleting photos from one device shows skulls on other devices, and the dbmaint script doesn't seem to work. Duplicating on one device doesn't show duplicated images on other devices. And this is just the first two things I tested.
Ideal solution would be to have an option "update database on startup", otherwise at least a manual option to "refresh" a film roll from the library.
That sounds like you have your images on the shared drive, but the actual library (database and configuration files) locally on each machine. You can use the --configdir commandline argument to point all of your machines at a common directory on the external drive, at the cost of slower operation (database updates as you work will take a bit longer) and not being able to edit from multiple machines at the same time.
Another option is skipping the database file with --library :memory:, but that will require reimporting each folder you want to work on every time you work on it, plus you lose the ability to search for images.
Didn't know about the configdir agrument. It might just work, thanks for helping out
@ralfbrown I've gotten around to testing it, doesn't seem to work unfortunately. Sharing the configdir seems to cause even more issues. All my images show up as skulls. My paths are all messed up as the path isn't the same on both devices, so when one creates the file paths the other can't find the images.
Any ideas how to proceed ? I'm a bit stuck unable to edit my photos and share the raws with other at the moment. Thanks
If you can't use symbolic links or common mount points to have your images located in the same path on all machines, sharing the database indeed does not work directly. There is a workaround, but it involves a bit of work each time you switch machines - you can have darktable change the paths for you (which will work best if your entire collection is in one directory tree). To do so, put the Collections module into folder view and navigate until you see the topmost directory with images. Then right-click on that directory's name, choose "update path to files...", and enter the correct path to that directory on the current machine.
I understand, thanks a lot for the input. Good idea about symbolic links though, that might be the solution. I haven't quite figured out how to make them be the same between Linux and Windows yet, but they have helped locate the NAS and getting the folders to show (pointing to an SMB share makes the folders not show in collections for some reason). This might be a "good enough" workaround for the time being.
This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.
As there is a lot of knowledge here, I have a question for this topic:
Consider: Multiple computers (in my case same OS), pictures on nas, syncing databases by --configdir "[nas] and everything is fine AS LONG as I am in the same network.
This setup would be used, to e.g. get a tower and a laptop - one fast, one for someone else or on the go. And the last point gives me a headache. I guess the local copy option would be the solution for this, BUT having everything on the nas, including the database, darktable won't even start, without a wifi connection (or possibly vpn to home, which most likley would work but be very slow). This is inconvenient, as it would mean additional manual data maintenance and possible errors. Same would apply for travel where I would edit photos on the go and get back with a (pre edited /culled) library.
(Second application start with different cmd parameters. Copy files with xmp, reimport library on nas etc. For local edits manual copying there and back again).
Is there any elegant solution for this possible right now?
Right now it seems, that both cases (nas, multiple stations) is (kind of) supported, but not together.
And as a comment to the path problem: might be an option for relative paths be good? In the nas case, the database will most likley be on the same nas as the pictures and then importing on any system would be independent of mounting / file system.
The issue with relative paths is that darktable supports multiple roots for your collection (in Windows-speak, you could have images on D:, E:, F:, etc.). Relative paths wouldn't be a big deal if everything had to be under a common top-level directory.
The issue with relative paths is that darktable supports multiple roots for your collection (in Windows-speak, you could have images on D:, E:, F:, etc.). Relative paths wouldn't be a big deal if everything had to be under a common top-level directory.
Hence the "option" part in my suggestion. Keeping it as is, but adding "collection path relative to database", (usecases: multiple OSes using same ressources on nas, or even possibly on an external drive). It should be realtively simple to get the (absolut) path of the library (has to be known anyways) and then stitch the absolut path from this and the relative path.
This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.
I also have trouble with this, compounded by my desktop PC being on Windows and my laptop being on Linux.
But right now, I'm even having a terrible time trying to remember how to get this working at all, as I noticed that "resync local copy" just hoses the XMP file on the network, since I just use "add to library" on both machines from a common network directory and right now, I can even do "load sidecar file" manually and point to the XMP edited on one machine and Darktable just completely ignores it!
Before, out of the box all changes and even tags seemed to get stored in the XMP which is nice and reduces the need for the database (except for ratings for some reason) but right now, some weird glitch is showstopping me from accessing my edits between my machines.
- eobet @.***> [10-04-25 10:11]:
eobet left a comment (darktable-org/darktable#17512)
I also have trouble with this, compounded by my desktop PC being on Windows and my laptop being on Linux.
But right now, I'm even having a terrible time trying to remember how to get this working at all, as I noticed that "resync local copy" just hoses the XMP file on the network, since I just use "add to library" on both machines from a common network directory.
I remove subject images from library and import anew with updated xmp files from images changed on a different computer.
-- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri facebook/ptilopteri Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet oftc
I remove subject images from library and import anew with updated xmp files from images changed on a different computer.
That's a terrible workaround to have to do!
But still, I tried it, and Darktable just overwrote my XMP with a default one. 🤬
Not sure what's causing this new behavior, but I can no longer use Darktable on two machines.
EDIT: No this now gets even weirder... checking back on my other computer, the edits were intact, even though the computer which couldn't see the edits updated the XMP file timestamp! Making sure to again explicitly "write sidecar files" on the photo, and then attempting to explicitly "load sidecar file" on the other machine again only yields a default history stack. I honestly don't know what's going on.
- eobet @.***> [10-04-25 10:39]:
eobet left a comment (darktable-org/darktable#17512)
I remove subject images from library and import anew with updated xmp files from images changed on a different computer.
That's a terrible workaround to have to do!
But still, I tried it, and Darktable just overwrote my XMP with a default one. 🤬
Not sure what's causing this new behavior, but I can no longer use Darktable on two machines.
well, I rarely work within the library and only import images when they are "supposedly" finished.
darktable --library :memory:
but I fail to understand "overwrote my XMP"
importing an image should bring the image's xmp w/o change, aside import date/time, until you open the imported image in dt.
-- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri facebook/ptilopteri Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet oftc
They were already "added to the library" separately on both machines from a common network folder. It's just that the machines can no longer see each other's edits and ratings regardless of what buttons I press in the app.
Using the option "look for updated XMP files on startup" fixes this, but now it takes SEVEN WHOLE MINUTES for Darktable to start!!
Not only that, after those seven minutes, there's now three clicks and another wait to confirm those updated XMPs... 😫
But at least that works. I don't know why the "resync local" and "load sidecar" buttons stopped working.
This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.