v2 replaces the pipe-delimited backups.conf with YAML (backups.yml)
and the cron daemon with a built-in scheduler. Backups produced by v1
remain readable: same .sql.gz/.tar.gz formats, same gpg -d
decryption for encrypted files.
docker run --rm -v /path/to/appdata:/config \
ghcr.io/greite/database-backup:2 migrate /config/backups.conf > backups.ymlReview the output, then mount it at /config/backups.yml.
| v1 column | v2 field |
|---|---|
| CRON_SCHEDULE | schedule |
| TYPE | type |
| HOST | host |
| PORT | port (optional, defaults by type) |
| DATABASE | database (also seeds name) |
| USER | user |
| PASSWORD | password (or switch to password_file) |
| RETENTION_DAYS | retention_days |
| PG_VERSION | pg_version |
| TLS | tls |
- Invalid configuration is now fatal at startup (v1 skipped bad lines
with a warning). Run
dbbackup validateto check before deploying. - Old backups are no longer rotated when the new backup failed.
- The container drops to uid 1000 after installing database clients;
at startup the container recursively fixes ownership of
/backupsand all subdirectories (including directories created by v1 when it ran as root) so that the unprivileged process can write new backups. - Logs go to container stdout (no
/var/log/cron.log). mongoshis no longer downloaded: the healthcheck uses native drivers.- Passwords may now contain any character, including the pipe
|. BACKUP_ENCRYPTION_PASSPHRASE/BACKUP_ENCRYPTION_PASSPHRASE_FILEkeep working unchanged and produce the same gpg-compatible files.