Merge branch 'master' into jammy_jellyfish

This commit is contained in:
Râu Cao
2023-12-05 14:21:55 +01:00
33 changed files with 102 additions and 253 deletions

View File

@@ -1,7 +1,6 @@
#!/bin/bash
# GENERATED BY CHEF
# DO NOT EDIT
set -e
REPOSITORY=$BORG_REPO
@@ -18,6 +17,7 @@ virsh snapshot-create-as --domain $1 \
--disk-only \
--diskspec vda,snapshot=external
# TODO report failures
borg create -v $REPOSITORY::$1_$(date +%F_%H-%M) \
/var/lib/libvirt/images/$1.qcow2 \
/root/backups/vm_meta/$1.xml

View File

@@ -1,14 +1,12 @@
#!/bin/bash
# GENERATED BY CHEF
# DO NOT EDIT
set -e
echo "Backing up all VMs with kvm_guest chef role..."
for domain in <%= @vm_domains.join(" ") %>
do
/root/backups/backup_vm.sh $domain
/root/backups/prune_vm_backups.sh $domain
/root/backups/backup_vm.sh $domain && /root/backups/prune_vm_backups.sh $domain
# TODO Enable this when upgrading borg to 1.2
# borg compact $BORG_REPO
done