Container image for creating cron-scheduled backups with borg backup based on Alpine Linux.
Toastie 8eb357bea4 changed outline | vor 5 Monaten | |
---|---|---|
build | vor 5 Monaten | |
scripts | vor 5 Monaten | |
.env.template | vor 5 Monaten | |
.gitignore | vor 5 Monaten | |
README.md | vor 5 Monaten | |
docker-compose.restore.yml | vor 5 Monaten | |
docker-compose.yml | vor 5 Monaten |
Container image for creating cron-scheduled backups with borg backup based on Alpine Linux.
docker compose build
to build the container image from ./build/Dockerfile
cp .env.template .env
.env
, parameters are explained in the template filedocker exec --rm -it borg bash -c "borg init --encryption repokey-blake2"
docker compose up -d
docker-compose.yml
.Very important! Following files MUST be stored along with the backup to enable decryption of the backup data:
.env
-file 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
Status and statistics are sent to Prometheus Push-Gateway using a simple bash-script and curl
/scripts/entry.sh
is called during container startup
and installs the cronjob defined in .env
variable $CRON/scripts/do-backup.sh
which
borg break-lock /mnt/repository