database-backup
database-backup
Docker app from GreiteTurtle's Repository
Overview
Lightweight Debian Slim image to automate PostgreSQL (12-18), MariaDB/MySQL, and MongoDB backups via cron.
Features:
- Dynamic client install at startup: only required tools are installed based on your config
- Flexible cron scheduling per backup job
- Automatic gzip compression (.sql.gz / .tar.gz) and timestamped files
- Configurable per-job retention with automatic rotation of old dumps
- Multiple databases (different types and hosts) handled by a single container
- Built-in healthcheck verifying connectivity to every configured database
- Multi-architecture (amd64, arm64) and auto-rebuilt on base image security updates
Setup:
- Copy backups.conf.example to your appdata directory and rename to backups.conf
- Edit backups.conf with your databases (one job per line, pipe-delimited)
- Map the file to /config/backups.conf and a host folder to /backups
See the project README for full configuration syntax and examples.
Runtime arguments
- Network
bridge- Shell
bash- Privileged
- false
Template configuration
Host path where database dumps are written. Files are organized as type/database/database_timestamp.sql.gz (or .tar.gz for MongoDB).
- Target
- /backups
- Default
- /mnt/user/appdata/database-backup/backups
- Value
- /mnt/user/appdata/database-backup/backups
Path to the backups.conf file on the host. Get the example from https://github.com/Greite/database-backup/blob/main/backups.conf.example and edit it before starting the container. One backup job per line, pipe-delimited: CRON_SCHEDULE|TYPE|HOST|PORT|DATABASE|USER|PASSWORD|RETENTION_DAYS|PG_VERSION
- Target
- /config/backups.conf
- Default
- /mnt/user/appdata/database-backup/backups.conf
- Value
- /mnt/user/appdata/database-backup/backups.conf
Categories
Details
ghcr.io/greite/database-backup:latestRun database-backup on Unraid.
database-backup is listed in Community Apps for Unraid OS. Explore Unraid to build a flexible home server, NAS, or homelab.