Edit me on GitHub

Substance D Command-Line Utilities

Substance D installs a number of helper scripts for performing admin-related tasks. To get full command-line syntax for any script, run it with --help.


Add a new user, making them part of the 'admins' group. Useful when recovering from a forgotten password for the default 'admin' user. E.g.:

$ /path/to/virtualenv/bin/sd_adduser /path/to/virtualenv/etc/production.ini phred password


Process deferred indexing actions. E.g., run this from a cron job to drain the queue every two minutes:

0-59/2 * * * * /path/to/virtualenv/bin/sd_drain_indexing /path/to/virtualenv/etc/production.ini


Dump an object (and its subobjects) to the filesystem.:

sd_dump [--source=ZODB-PATH] [--dest=FILESYSTEM-PATH] config_uri
Dumps the object at ZODB-PATH and all of its subobjects to a
filesystem path.  Such a dump can be loaded (programmatically)
by using the substanced.dump.load function


$ /path/to/virtualenv/bin/sd_dump --source=/ --dest=/tmp/dump /path/to/virtualenv/etc/development.ini


Query for pending evolution steps, or run them to get the database up-to-date. See Running an Evolution from the Command Line.


Reindex the catalog. E.g.:

$ /path/to/virtualenv/bin/sd_reindex /path/to/virtualenv/etc/development.ini