change tarball filename

This commit is contained in:
Russ Long 2020-04-08 15:44:45 -04:00
parent 3f96c1e611
commit 2d6735e0fb

View File

@ -18,7 +18,7 @@ for vm in $(virsh list --all --name); do
DEVPATH=$(virsh domblklist $vm | grep -i vda | awk '{print $2}') DEVPATH=$(virsh domblklist $vm | grep -i vda | awk '{print $2}')
virsh dumpxml --security-info $vm > $XMLPATH/${vm}_${DATE}.xml 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 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 virsh blockcommit $vm vda --active --verbose --pivot
rm -f $SNAP_PATH/${vm}_temp_$DATE.qcow2 rm -f $SNAP_PATH/${vm}_temp_$DATE.qcow2
done done