{% extends "admin/dbs/wiki/_layout.html" %} {% block wiki %}
INSTALLED_APPS = [..., "django.contrib.admin", "dbs"]
MIDDLEWARE = [..., "dbs.security.middleware.DBSSecurityMiddleware"]
python manage.py migrate
django.contrib.admin mounts this panel; the middleware runs the session
guard. Upgrading from 0.2.x needs that migrate — 0.3.0 added tables.
DBS backs up every model it finds. To narrow that, add a dbs.py to an app:
from dbs import backup_registry, ModelBackup
from myapp.models import Invoice
@backup_registry.register
class InvoiceBackup(ModelBackup):
model = Invoice
From this panel, use Take a backup. From a shell:
python manage.py dbs backup /var/backups/app.dbs
python manage.py dbs schedule --interval 6h --output-dir /var/backups --keep 14
Run one scheduler per output directory. Two loops sharing a directory race on retention.
{% endblock %}