finish borg setup

This commit is contained in:
Pim Kunis 2023-01-11 01:04:13 +01:00
parent 898e9b1c16
commit 9598341a81
4 changed files with 13 additions and 16 deletions

View file

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

View file

@ -0,0 +1,17 @@
location:
source_directories:
- {{ base_data_dir }}
repositories:
- ssh://root@lewis.lan/root/homeserver_backup
retention:
keep_daily: 7
keep_weekly: 4
keep_monthly: 6
storage:
ssh_command: ssh -i /srv/borg/id_ed25519
unknown_unencrypted_repo_access_is_ok: true
hooks:
before_everything:
- systemctl stop docker docker.socket
after_everything:
- systemctl start docker