Backup Docker containers and volumes to a restic repository.
- Multiple Docker Compose projects from one config file
- Parallel or sequential execution
- Automatic container stop/start during backup
- Per-project retention policies (forget) with a single global prune
- Pre/post backup hooks
- YAML, JSON, TOML config support
-
Copy and edit a config file:
cp config.example.yaml config.yaml # Edit config.yaml with your restic repo and projects -
Run manually:
./dbk --config config.yaml
Copy dbk to /usr/local/bin/dbk:
sudo cp dbk /usr/local/bin/dbkCopy your config to /etc/dbk/config.yaml:
sudo mkdir -p /etc/dbk
sudo cp config.yaml /etc/dbk/sudo cp dbk.service /etc/systemd/system/
sudo cp dbk.timer /etc/systemd/system/sudo systemctl daemon-reload
sudo systemctl enable dbk.service
sudo systemctl start dbk.timer
sudo systemctl enable dbk.timersystemctl list-timers
sudo systemctl status dbk.timer
sudo journalctl -u dbk -fSee config.example.yaml for all options.
Required: restic_repo, projects[] with compose_file, sources, stop_timeout, start_timeout, retention_policy
Global: auto_prune, prune_options
Per-project: forget_options, pre_backup_cmd, post_backup_cmd
MIT