add discspec

This commit is contained in:
Jochen Welzel 2021-01-06 09:24:19 +01:00
parent 7d190f6332
commit 0b07035565

View File

@ -31,5 +31,13 @@ fi
DATE=$(date "+%Y%m%d")
DATE30=$(date -d "-30day" "+%Y%m%d")
SNAPNAME="backup_$DATE"
VMDISKS=$(virsh domblklist $VM | egrep -o vd.)
DISKSPEC=""
for disk in $VMDISKS
do
DISKSPEC+="--discspec $disk,file=/srv/snapshots/$VM/$VM-$disk-$SNAPNAME.qcow2,snapshot=external "
done
echo $DISKSPEC