I've reproduced some toning presets in Darktable to mimic a Windows plugin called B/W Styler. Is there a way to save/export module presets, and then import them into Darktable on a different machine (or after a re-install of the OS)?


4 Answers 4


If you're not afraid of command line, it's explained on https://redmine.darktable.org/projects/users/wiki/Manual_exportimport_of_styles_presets_and_masks

The core of it is:

Export from old context

sqlite3 ~/.config/darktable/library.db
.output presets.backup
.dump presets
.output styles.backup
.dump styles
.output style_items.backup
.dump style_items
.output masks.backup
.dump masks

Import on new context

Always stop darktable before playing with your darktable library file. Also, keep backup copies of your darktable library file before tampering with it.

sqlite3 ~/.config/darktable/library.db <presets.backup

sqlite3 ~/.config/darktable/library.db <styles.backup
sqlite3 ~/.config/darktable/library.db <style_items.backup

sqlite3 ~/.config/darktable/library.db <masks.backup

I did it and it worked for me, though not at first try. I had to edit each backup file and add a DROP TABLE tablename before every CREATE TABLE tablename.

  • \$\begingroup\$ Note that in recent versions of darktable, the presets are no longer stored in library.db, but in their own data.db. \$\endgroup\$ Aug 11, 2017 at 1:56

One of darktable's little quirks is that it stores module presets in the library database, the same one that is otherwise primarily used for storing data about the image files and how they've been processed. A few users have complained about this on the mailing list, but AFAIK it's still working this way in 2.x versions. This makes it difficult to backup and transfer your presets independently of image data. What you can do is export/import each preset as a style, but this can be tedious, to say the least. I don't know of a more elegant solution, though (and if someone else does, I'll be thrilled to hear about it!).

Another aspect of this worth giving a warning about is the fact that your presets will be gone after an image database rebuild such as is sometimes suggested in cases of a corrupted or fragmented database.

UPDATE: It looks like this situation will change with v2.2.0, with presets being stored in their own "data.db" database, which should make this a non-issue.

  • 1
    \$\begingroup\$ Thanks - that's what I had suspected, and saving as a style is the route I had taken. Hopefully the module presets will eventually be migrated out of the database and stored in a folder - it would be nice to save (and share) individual presets along with the ability to save and share overall styles. \$\endgroup\$
    – kyle5434
    Feb 29, 2016 at 11:34

I ran into the same issue and decided to write a small python program to export presets selectively. This way I can save and restore settings for different cameras selelectively.

You can find the tool here: https://github.com/obruendl/darktable_library_tool

The code is a bit ugly currently but I plan to improve it and also add one or the oder feature in future. Let me know if you have suggestions for features.

  • \$\begingroup\$ Note that in recent versions of darktable, the presets are no longer stored in library.db, but in their own data.db. \$\endgroup\$ Aug 11, 2017 at 1:56

In terms of an OS upgrade, one solution is to keep your OS and programmes on a fast SSD and your documents on a large HDD. Darktable has an option to place the database wherever you want it, so put it on the documents HDD and when you upgrade your OS SSD the new installation can be set to read the existing database using the --library command line parameter.


Alternatively just back the database up and replace it in the default directory for the new installation.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.