Container image for creating cron-scheduled backups with borg backup based on Alpine Linux.
toastie89 504924e297 initial | 5 months ago | |
---|---|---|
build | 5 months ago | |
scripts | 5 months ago | |
.env.template | 5 months ago | |
.gitignore | 5 months ago | |
README.md | 5 months ago | |
docker-compose.restore.yml | 5 months ago | |
docker-compose.yml | 5 months ago |
Container image to create cron scheduled backups using borg backup based on Alpine Linux.
Following files MUST be stored along with the backup to enable encryption of backup data
.env
-file which contains the Passphrasedocker compose build
to build the container image from ./build/Dockerfile
cp .env.template .env
and adapt .env
(parameters are explained in the template file)docker exec --rm -it borg bash -c "borg init --encryption repokey-blake2"
docker-compose up -d
/scripts/entry.sh
is called during container startup
and installs the cronjob defined in .env
variable $CRON/scripts/do-backup.sh
which
docker 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
.
borg break-lock /mnt/repository