13,420
edits
Changes
no edit summary
if [ "$answer" = "y" ] # Backup all VMs if answer is yes<br>
then<br>
for num in 1 2 3 # Determinant loop for 3 arguments: 1, 2, and 3<br>
do<br>
echo "Backing up VM #$num"<br>
gzip < /var/lib/libvirt/images/centos$num.img > /root/centos$num.img.backup.gz<br>
<br> echo "VM #$num BACKUP DONE"<br>
done<br><br>
elif [ "$answer" = "n" ]<br>