{% extends "admin/dbs/wiki/_layout.html" %} {% block wiki %}

Passphrases and SECRET_KEY

DBS derives its backup passphrase from Django's SECRET_KEY, so there is nothing to configure. The derivation is domain separated, meaning the backup key is never the same bytes Django uses for sessions, CSRF and password-reset tokens.

Order of precedence

  1. An explicit --passphrase, --passphrase-stdin, or the form field.
  2. The DBS_PASSPHRASE environment variable.
  3. The DBS_PASSPHRASE setting.
  4. Derived from SECRET_KEY.

Rotating SECRET_KEY

A backup encrypted under a SECRET_KEY you later lose cannot be opened. When you rotate, keep the old value in SECRET_KEY_FALLBACKS; DBS tries every fallback on restore. To archive the derived passphrase somewhere safe:

python manage.py dbs key --show
{% endblock %}