Container image for creating cron-scheduled backups with borg backup based on Alpine Linux.
toastie89 ba84dbd11c set hostname in PROM_URL as variable | 4 months ago | |
---|---|---|
build | 5 months ago | |
scripts | 5 months ago | |
.env.template | 4 months ago | |
.gitignore | 5 months ago | |
README.md | 5 months ago | |
docker-compose.restore.yml | 5 months ago | |
docker-compose.yml | 4 months ago |
Container image for creating cron-scheduled backups with borg backup based on Alpine Linux.
docker compose build
.env
. Copy and adapt .env.template which describes all variables:cp .env.template .env && vi .env
docker exec --rm -it borg bash -c "borg init --encryption repokey-blake2"
docker compose up -d
docker exec borg bash -c 'do-backup.sh'
docker-compose.yml
.Very IMPORTANT! The following files MUST be stored along with the backup to enable decryption of the backup data:
.env
-file containing the passphrasedocker compose down
docker compose -f docker-compose.yml -f docker-compose.restore.yml run borg bash
borg mount $BORG_REPO <mount_point>
borg umount <mount_point> && exit
.docker-compose up -d
Simple bash scripts sent the backup status and statistics using curl
to a Prometheus Pushgateway defined in .env
.
.env
as environment variables in the container/scripts/entry.sh
is called during container startup
and installs the cronjob defined in the $CRON/scripts/do-backup.sh
which
docker exec borg bash -c 'borg break-lock'