report backup status using apprise

This commit is contained in:
Pim Kunis 2023-05-10 18:54:43 +02:00
parent 50f2d0ada1
commit 15e8d14327
5 changed files with 40 additions and 17 deletions

View file

@ -0,0 +1,27 @@
# vi: ft=yaml
location:
source_directories:
- /data
repositories:
- 'ssh://root@lewis.hyp/mnt/kingston1TB/hosts/{{ ansible_hostname }}'
retention:
keep_daily: 7
keep_weekly: 4
keep_monthly: 6
storage:
unknown_unencrypted_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'