Systemd scripts for backing up lvm-volumes in docker with borg
It depends on the borg-backup docker-container from https://github.com/pschiffe/docker-borg
- Use
./install
to link the systemd-service and timer - To set up a new backup service, use the
systemctl start borg-backup@**service**.timer
syntax - Set up the timer with
systemctl edit borg-backup@**service**.timer
and use this style:
[Timer]
OnCalendar=*-*-* 01:00:00
- Set up the service with
systemctl edit borg-backup@**service**.service
,for example, to backup volume test_data and test_db:
[Service]
Environment="LVM_VOLUMES=**test_data** **test_db**"
- If wanted, you can overwrite the
BORG_CHECK
Environment variable for prune and repo-check
[Service]
Environment="[...]"
Environment="BORG_CHECK=true"