location: source_directories: - /mnt/thecloud repositories: - /mnt/backups/share exclude_patterns: - /mnt/thecloud/mastodon/system/cache retention: keep_daily: 7 keep_weekly: 4 keep_monthly: 6 hooks: before_everything: - virsh snapshot-create-as --domain tf-thecloud --name backup-thecloud --disk-only --quiesce --no-metadata --diskspec vda,snapshot=no --diskspec vdb,file=/kvm/snapshots/thecloud.qcow2 - guestmount -a /kvm/snapshots/thecloud.qcow2 -m /dev/sda1 --ro /mnt/thecloud after_everything: - guestunmount /mnt/thecloud && sleep 1 - virsh blockcommit tf-thecloud vdb --active --verbose --pivot - rm /kvm/snapshots/thecloud.qcow2 - apprise --body="Backup succeeded!" {{ apprise_url }} || true