darktable: finding database/catalogue on my MacOs

Hi.
A very easy and dumb question, for you experienced: does anyone knows wher darktable stores its catalogue-database within one’s machine? I run MacOS and I still could not locate it, not even via search function typing “darktablecr”.
Any idea?
Then, does its size tends to increase in time, as with other software like LR?

Thanks!
M.

The default database name is library.db - search for that.
There is a config file which is called darktablerc (note the spelling)

Thanks.
My spotlight does not find anything similar to darktable, safe for the user manual…
Weird indeed.
Any idea if I can run a search via terminal? Me dunno…

Thanks!

Yes - you could use find -iname darktablerc from your home directory. Although that may be slow. You could use locate, but I think by default macOS doesn’t generate a locate database. If so, it will give you instructions the first time you run locate, so you can just try locate darktablerc (which, once the database is generated, is light-years faster than find).

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