This repository has been archived on 2023-12-26. You can view files and clone it, but cannot push or open issues or pull requests.
hypervisors/ansible/roles/borg/templates/backup.yml.j2

28 lines
1 KiB
Django/Jinja

# vi: ft=yaml
location:
source_directories:
- /data
repositories:
- 'ssh://root@lewis.hyp/mnt/backups/hosts/{{ ansible_hostname }}'
retention:
keep_daily: 7
keep_weekly: 4
keep_monthly: 6
storage:
unknown_unencrypted_repo_access_is_ok: true
relocated_repo_access_is_ok: true
hooks:
before_everything:
- 'apprise --body="{{ ansible_hostname }}: Stopping VMs" {{ apprise_url }} || true'
- /root/stop_vms.sh
- 'apprise --body="{{ ansible_hostname }}: Stopped VMs" {{ apprise_url }} || true'
after_everything:
- 'apprise --body="{{ ansible_hostname }}: Starting VMs" {{ apprise_url }} || true'
- /root/start_vms.sh
- 'apprise --body="{{ ansible_hostname }}: Started VMs" {{ apprise_url }} || true'
before_backup:
- 'apprise --body="{{ ansible_hostname }}: Performing backup" {{ apprise_url }} || true'
after_backup:
- 'apprise --body="{{ ansible_hostname }}: Backup done" {{ apprise_url }} || true'
on_error:
- 'apprise --body="{{ ansible_hostname }}: Backup error" {{ apprise_url }} || true'