diff --git a/vmbackup.sh b/vmbackup.sh index e5abed6..3eade15 100644 --- a/vmbackup.sh +++ b/vmbackup.sh @@ -18,7 +18,7 @@ for vm in $(virsh list --all --name); do DEVPATH=$(virsh domblklist $vm | grep -i vda | awk '{print $2}') virsh dumpxml --security-info $vm > $XMLPATH/${vm}_${DATE}.xml virsh snapshot-create-as --domain $vm ${vm}_temp_$DATE --diskspec vda,file=$SNAP_PATH/${vm}_temp_$DATE.qcow2 --disk-only --quiesce --atomic --no-metadata - tar czvf $SNAP_PATH/${vm}_$DATE.qcow2.tar.gz $DEVPATH + tar czvf $SNAP_PATH/${vm}_$DATE.tar.gz $DEVPATH virsh blockcommit $vm vda --active --verbose --pivot rm -f $SNAP_PATH/${vm}_temp_$DATE.qcow2 done