Skip to main content

DBS

DBS — Django Backup Solution

Encrypted, self-healing backups for Django projects, and a manager that looks after them on every server.

PyPI version Python versions CI License Status: active development, stable since 0.8.0

0.8.2 is out: what's new · release notes · upgrading


What DBS does

  • One file per backup. A backup holds your project's rows, the relations between them and its uploaded files, encrypted.
  • It repairs itself. Every backup stores two copies of your data plus Reed-Solomon parity, so damage to the file is found and repaired when you restore, instead of quietly breaking the data you rely on.
  • A panel in your admin. /admin/dbs/ schedules backups, restores them, reports their health and keeps a tamper-evident audit trail, behind a session guard.
  • A manager for your servers. django_dbs run starts a local application that finds the Django projects on your servers (on the server itself, in Compose or in a container, under Docker or Podman), pulls their backups to your machine, and restores, deploys or moves them.
  • Claude at the controls, safely. Through MCP, Claude can add servers, take and verify backups and rehearse restores, without ever seeing a secret or changing anything for real.

Quick start

You need Python 3.9 or later and Django 4.2 to 6.x.

1. Back up a project.

pip install django-dbs
# settings.py
INSTALLED_APPS = [..., "dbs"]                  # beside django.contrib.admin
MIDDLEWARE = [..., "dbs.security.middleware.DBSSecurityMiddleware"]  # below AuthenticationMiddleware
DBS_BACKUP_DIR = "/var/backups/myproject"
python manage.py migrate
python manage.py dbs upgrade                            # checks the setup, says what is missing
python manage.py dbs backup backup.dbs                  # an encrypted backup
python manage.py dbs validate backup.dbs --passphrase   # check it
python manage.py dbs restore backup.dbs --dry-run       # rehearse a restore
python manage.py dbs key --show                         # keep this somewhere safe

The passphrase is derived from your SECRET_KEY, so keep SECRET_KEY stable.

2. Open the panel at /admin/dbs/ as a superuser, and turn on Schedule.

3. Look after your servers from your own machine:

pipx install django-dbs
django_dbs run

Create the master account on the page that opens, add a server, then add an application by answering How it runs and choosing its folder. The manager finds the project, checks it and takes a first backup.

4. Optionally, let Claude help: claude mcp add dbs -- django_dbs mcp.

The getting started guide walks through each step.

What's new in 0.8.0

  • Servers and applications. A server is an SSH machine, and each Django project on it is an application, found from its folder: on the server itself, in Compose or in a container, under Docker or Podman.
  • How it runs. The application wizard asks how the project is deployed, compares your answers with what it finds, and gives the next step for anything missing.
  • Move a whole server, even onto one with nothing installed. The manager installs what is missing with sudo, carries the code, images, volumes and .env, and restores the data from a fresh backup. The old server keeps running untouched.
  • Deploy in place from a fixed catalogue of steps, after a safety backup. Plans get a first run, a time zone and a pause, and the manager has a console and a terminal in the browser.
  • Lighter on your site. Panel backups and restores run in a process of their own, large tables are read in pages, and a broken transfer resumes where it stopped.
  • One install, stable from here. pip install django-dbs brings everything, and the manager answers to django-dbs, django_dbs and dbs. What 0.8.0 offers stays in every later release; see Stability.

0.8.1 fixes the manager finding no application on a server that runs many containers: it now reads everything a command prints there. Upgrade the machine the manager runs on; the 0.8.1 release notes say what else it fixes.

0.8.2 finds a project's .env when it is not beside manage.py: beside the settings module, or in the folder above the project. The 0.8.2 release notes say where it looks and how to name a .env kept anywhere else.

Upgrading from 0.7.x:

pip install --upgrade django-dbs
python manage.py dbs upgrade

On the manager's machine, pipx upgrade django-dbs; it migrates itself the next time any django_dbs command runs. The release notes and the changelog have every detail.

How it works, in brief

  • Encryption: Argon2id turns the passphrase into a key, and AES-256-GCM encrypts the data. A wrong passphrase never yields data.
  • Redundancy: every block is stored twice, 64 blocks apart, with Reed-Solomon parity and a keyed tag, so a backup survives a burst of damage and scattered damage in both copies.
  • Verification: every new backup is read back and checked before it counts.
  • Pulling, never pushing: servers keep at most five backups each. The manager pulls them over SSH, verifies them and keeps at most five per application; a server never contacts it.

More in How it works.

Documentation

Getting started From nothing to backups that are taken, checked and kept elsewhere
DBS in a Django project Settings, the backup commands, large tables, and what goes into a backup
The panel Scheduling, restoring, health and the audit trail at /admin/dbs/
The DBS manager Servers, applications, plans, Docker and Podman, .env versions, console, terminal, roles
Deploying and moving Deploy in place, move to another application, move a whole server
Restoring and passphrases What a restore does, and keeping backups opening
The session guard The protection around the panel
AI assistants Instructions for coding assistants, and Claude through MCP
How it works The format, how it heals, the security model
Reference Commands, settings, Python API
Troubleshooting · Upgrading · Stability · Development When something does not work, between releases, what never changes, and working on DBS itself

What you need

  • Python 3.9 or later, and Django 4.2 to 6.x.
  • pip install django-dbs brings everything DBS uses: the backup library, scikit-learn for the session guard, paramiko for SSH, and djangorestframework, waitress and keyring for the manager. A project's web process imports only what it uses.
  • The manager needs nothing else on its machine: no Node, no Docker, no Redis and no database server.

Status

0.8.2 is the current release. DBS is in active development, and stable from 0.8.0: new releases add, and nothing you use breaks.

  • Your backups keep opening. Every backup written by 0.8.0 or later restores, with the same passphrase, in every later release. Nothing in DBS deletes or overwrites a backup.
  • Your project keeps working. The Python API, commands and options, settings and their defaults, the manager's REST API and MCP tools stay as they are; the test suite checks every change against each recorded release.
  • Upgrades are checked for you. python manage.py dbs upgrade checks a project after each upgrade, and the changelog lists every change.

The full promise is in Stability. To contribute, see CONTRIBUTING.md.

Security issues: see SECURITY.md.

License and credits

MIT. The manager's interface bundles Font Awesome Free (icons under CC BY 4.0, fonts under the SIL OFL 1.1), the Tajawal typeface (SIL OFL 1.1), qrcode-generator (MIT) and xterm.js (MIT). THIRD_PARTY_LICENSES.md lists the license of every dependency.

Created by Sudum Technology — Research and Development sector. Our very tiny contribution to this world.

Metadata

Release files for django-dbs 0.8.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-dbs 0.8.2
File Size Uploaded Provenance Actions
django_dbs-0.8.2.tar.gz 1.5 MB With provenance Details for django_dbs-0.8.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-dbs 0.8.2
File Interpreter ABI Platform Actions
django_dbs-0.8.2-py3-none-any.whl Python 3 none any Details for django_dbs-0.8.2-py3-none-any.whl

Total release size: 3.1 MB

Release files / django_dbs-0.8.2.tar.gz

Download URL django_dbs-0.8.2.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
2768a5c05fad00fd1205e1eb0d227eaf07be7f3aebda7521c50b933287731e5e
BLAKE2b-256 checksum
How to use checksums
4c5c92dba8de19b5da6bcf7d06b78114a1e421404fcc4bfcb2cbac38c5bdb60f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Release files / django_dbs-0.8.2-py3-none-any.whl

Download URL django_dbs-0.8.2-py3-none-any.whl
Size 1.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
a5acc3b0dc4017077989984390d726909bfe5132f2b38a86931a3f730ac29747
BLAKE2b-256 checksum
How to use checksums
4cfafcb5491eca3ab3adcade73276efcdcdb37cffe2e32fa96835253afcdfdc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Security for django-dbs 0.8.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_dbs-0.8.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page