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

Scheduled backups

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.

Choosing where it runs

Health shows when the scheduler last checked in and whether the last backup is on time.

A fixed plan from the command line

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.

{% endblock %}