Personal project I use to back up my homelab, packaged as an Alpine-based container image with:
- restic for deduplicated backups
- rclone for cloud storage transports
- apprise for multi-service notifications
sqliteandpostgresql-clientfor database-aware helpers
It leans on supercronic so cron jobs stay visible and resilient inside containers.
- Copy
examples/compose.yamlinto your stack and adjust the secrets and repository targets. - Drop your restic cron entries into
configs.restic-backup-cron. They will be picked up from/etc/supercronic/crontabat runtime. - Mount the data you want to back up via
volumesorvolumes_fromand restart the service.
docker compose -f examples/compose.yaml up --detachThe provided example backs up a Vaultwarden container, prunes old snapshots, and runs restic check nightly.
The entrypoint only reads a single optional variable:
| Variable | Description |
|---|---|
RESTIC_INIT_ARGS |
Extra flags passed to restic init. |
Every other variable you see in the compose example (RESTIC_REPOSITORY, RESTIC_PASSWORD_FILE, RCLONE_CONFIG, APPRISE_URL, etc.) belongs to restic, rclone, or apprise. Set them exactly as those projects expect.
Need additional tools (for example mysqldump)? Extend the image:
FROM ghcr.io/mbotezatu/restic-backup:latest
RUN apk add --no-cache mysql-clientDistributed under the terms of the MIT License. See LICENSE for details.