Description
docker-db-auto-backup is a container that backs up every database running under Docker on a host, automatically, with optional compression. It detects common databases, including MySQL, MariaDB, PostgreSQL and several PostgreSQL variants such as TimescaleDB, pgvector, pgvecto.rs, Nextcloud's AIO setup, pgautoupgrade and Immich's Postgres with VectorChord, as well as Redis. If a database is not detected, you can mark its container with a db-auto-backup label, and the label name can be changed with an environment variable. The container needs access to the Docker socket, either by mounting it or through an HTTP proxy set as DOCKER_HOST. You mount a backup directory at /var/backups, and backups are saved there named after each container. They are not dated and are uncompressed by default. Backups run daily at midnight, and a cron-style schedule can change that. Output is kept short to avoid filling container logs, and a debug option adds details. On success the script can call a URL, with a GET request by default or a POST that includes logs if you set an option. Older options for healthchecks.io and Uptime Kuma still work. It suits self-hosters who run several database containers and want simple, automatic dumps.…
Highlights
- Backs up all detected databases in Docker
- Label to add unsupported databases
- Daily schedule with cron option
- Success hook for monitoring
- Optional compression
Ratings & Reviews
No ratings yet
Be the first to rate Docker DB Auto Backup.
People also visit
Databasus
PostgreSQL backup tool with Point-In-Time-Recovery and restore verification
Docker DB Auto Backup FAQ
What does it back up?
Databases running in Docker containers on the host, including MySQL, MariaDB, several PostgreSQL variants, and Redis.
How do I back up a database it does not detect?
Add the db-auto-backup label to its container. The label name can be changed with an environment variable.
How often does it run?
Daily at midnight by default. You can set a cron-style schedule to change that.
Are the backups compressed?
Not by default. The README says backups are uncompressed and not dated, and compression is an optional feature.
How do I get notified?
Set SUCCESS_HOOK_URL and the script calls it after a successful backup. Set INCLUDE_LOGS to send the logs with a POST request.
What are the best Docker DB Auto Backup alternatives?
Popular alternatives to Docker DB Auto Backup include Databasement, Databasus and Velld. See all Docker DB Auto Backup alternatives

