{% extends "admin/dbs/wiki/_layout.html" %} {% block wiki %}
Open Schedule, tick
enabled, and choose how often (30m, 6h, 1d)
and how many backups to keep in DBS_BACKUP_DIR. Pick an SFTP target to copy
each backup off the server as well.
The schedule runs inside your web workers. Each worker starts a small background thread on the first request it serves, and the thread checks once a minute whether a backup is due. A lease in the database lets exactly one of them take each backup.
DBS_SCHEDULER = "thread" (default): inside the web workers.DBS_SCHEDULER = "command": run python manage.py dbs schedule
under systemd. It follows the same panel setting. Use it behind uWSGI without
--enable-threads, or when several hosts each keep their own
DBS_BACKUP_DIR.DBS_SCHEDULER = "off": no scheduled backups from this project.Health shows when the scheduler last checked in and whether the last backup is on time.
Flags still run their own plan, ignoring the panel:
python manage.py dbs schedule --interval 6h --output-dir /var/backups \
--keep 14 --push offsite --keep-remote 7
SIGTERM stops the loop at once, and --once runs a single cycle
from cron. DBS_SCHEDULE_INTERVAL, DBS_SCHEDULE_KEEP and
DBS_SCHEDULE_KEEP_REMOTE seed the panel's first schedule and supply the
defaults for these flags.