add backup service

This commit is contained in:
Pim Kunis 2023-04-11 22:10:57 +02:00
parent 4946f503a2
commit 72240e1382
6 changed files with 57 additions and 2 deletions

View file

@ -0,0 +1,6 @@
[Unit]
Description=Backup data using borgmatic
[Service]
ExecStart=/usr/bin/borgmatic --config /root/backup.yml
Type=oneshot

View file

@ -0,0 +1,14 @@
location:
source_directories:
- /mnt/atlas
repositories:
- {{ backup_location }}
retention:
keep_daily: 7
keep_weekly: 4
keep_monthly: 6
hooks:
before_everything:
- echo down | ssh backup-control@atlas.lan
after_everything:
- echo up | ssh backup-control@atlas.lan