mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-09 22:46:59 +08:00
qemu_kvm: Add VM exclusion lists
This commit is contained in:
parent
7fbc31748e
commit
d6b1aa2264
1 changed files with 6 additions and 0 deletions
|
@ -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}"
|
||||
|
|
Loading…
Add table
Reference in a new issue