qemu_kvm: Add VM exclusion lists

This commit is contained in:
deajan 2025-06-26 17:38:07 +02:00
parent 7fbc31748e
commit d6b1aa2264

View file

@ -12,6 +12,8 @@ VMS=$(virsh list --name --all)
# Optional manual machine selection
#VMS=(some.vm.local some.other.vm.local)
EXCLUDE_VMS=(some_lab_vm.local some_other_non_to_backup_vm.local)
DEFAULT_TAG=retention3y
SPECIAL_TAG=retention30d
SPECIAL_TAG_VMS=(some.vm.local some.other.vm.local)
@ -243,6 +245,10 @@ function run {
# Empty file
: > "$BACKUP_FILE_LIST"
if [ $(ArrayContains "$vm" "${EXCLUDE_VMS[@]}") -eq 0 ]; then
log "Not backing up $vm due to being in exclusion list"
fi
CURRENT_VM_SNAPSHOT=""
log "Running backup for ${vm}"