darktable: finding database/catalogue on my MacOs

It will increase as you add more photos, yes. It has to! To give you an idea, my database is currently 14M with 5639 photos. You could probably run some sqlite3 magic to reduce the size a bit if you do a lot of adding and removing of photos (VACUUM), but if you try that, backup your database first!!! Also, only try it when darktable is not running. It’s also possible that darktable does this automatically, in which case it’s useless :joy:

[Edit] Can confirm that darktable does not do this by default. You can use sqlite3 library.db "VACUUM" to vacuum the database. But again, backup the database first and don’t do it while darktable is running.

51

I get this message when giving that command in terminal, see attached. Shall I proceed??
darktablecr it cannot find it it seems.

If I want to move the database on external drive I first have to find it…

Thanks

Yes, go ahead and generate the database. It will take a while the first time though. You can also try find as I suggested earlier, which will search everything under the current directory (whereas locate does a global search across everything it’s indexed).

I struggle to understand how I need to create a database when I am already running the program. It should have created it already! I don’t understand. I tried both “locate darktablecr” and similar, but nothing was found.

Will I then be able to move the database around, for instance on an external drive?

Thanks for your patience

No no no! This is the database for the locate program, which lets you find files on your hard drive (think of it as spotlight before there was spotlight, and on the terminal). Until you generate the locate database, locate darktablerc won’t work (it doesn’t have a database to query!).

Did you try find -iname darktablerc?

1 Like

Note that under MacOS, the find command requires a start directory.

find ~/ -iname darktablerc

should work.

1 Like

Ah, welp. Thanks for catching that (I use Debian haha).

2 Likes

Thanks!
With that command I had as follows:

Matteos-iMac:~ matteobertolino$ find ~/ -iname darktablerc
/Users/matteobertolino//.config/darktable/darktablerc

But still can´t find it!! Hey, it must be me… within that folder (matteobertolino) I cannot find any .config, I dogged into library folder but nothing.

As said, it must be me.
Thanks.

Try going there in the terminal! cd /Users/matteobertolino/.config/darktable/. The folder is most likely hidden within Finder. In the same folder, you should also find library.db and other things.

1 Like

I must be giving the wrong command. I am no “terminal” guy jeje

:slight_smile:

00

You missed the most important part! The command is now cd (change directory), not find! Also, note that I didn’t have the ~ in my command. If you want that, use this instead: cd ~/.config/darktable (~ is the same as /Users/matteobertolino)

1 Like

I added the ~ because I understood from Karl that I was supposed to add it since I run a Mac. I must have misunderstood. Anyway, with or without don’t work. 53
Anyway, no luck. And no skills! See attached.
What am I still doing wrong?

It did work! Now use ls to see the files in the directory.

Enable hidden folders in Finder: osx show hidden folders in finder - Google Suche

Then you should be able to use finder to manipulate the files.

2 Likes

This is the beauty of the terminal. I can provide instructions for a platform I never use because it shares a good chunk of the terminal utilities with the one I use :grinning:

1 Like

Yeah. Got it.

Thanks everyone!! 44

Please make sure to understand how darktable finds the library before moving it around. The default database is expected in that folder, and you need to run darktable from the command line with additional command line options to access it somewhere else.

2 Likes

It looks like you got it sorted. Holding down command-shift-. (period) displays the hidden files in the Mac Finder. Doing it again makes them invisible again.

When I first migrated all my lifetime’s photos from Aperture to darktable, I imported all my photos (a few hundred thousand) into one darktable library and it just about ground to a halt. Unusably super sluggish. So I switched to running one library for each year of photos.

I keep a folder in the .config/darktable folder called “my libraries” and inside that is one folder for each year. Inside each is the library.db folder for that year. When I want to run darktable with a year other than 2018, I move 2018’s library.db folder into its 2018 folder and move the other year’s library.db file up to the top of the darktable folder. Then start darktable.

It works pretty well. Except that I’m still figuring out the best way to search across all my years’ library.db sqlite databases at once. I’ll do that outside of darktable.

1 Like

Dear Jon,

thanks for your post. Inspiring. At least to me.

Now, so that you know, I come from Lightroom, and I am not going to import my (thousands of) photos. No way, too much of a mess and I don´t have the .xmp files from LR. End of the story.

Now, I struggle to understand how to create a new library in darktable, I do not find the way. Could you explain that to me, please? Since I run Mac, my DT library folder is normally invisible, that’s why I took my a while to find it. In fact, with LR, I used to create a new catalogue for each year.
I am struggling to find a way to replicate the same workflow.

Thanks in advance for your help

M.

In reply