diff --git a/libvirt-zsh-backup.sh b/libvirt-zsh-backup.sh index 5e92feb..7a95518 100644 --- a/libvirt-zsh-backup.sh +++ b/libvirt-zsh-backup.sh @@ -45,6 +45,9 @@ done # create snapshot dataset zfs create tank/snapshots/$VM +# create virsh xml-dump of vm +virsh dumpxml $VM > /srv/vms/$VM/vm-$VM.xml + virsh snapshot-create-as --domain $VM --name $SNAPNAME --quiesce --atomic --disk-only $DISKSPEC >/dev/null 2>&1 if [ $? -ne 0 ] then