Open main menu

CDOT Wiki β

Changes

OPS245 Lab 2

16 bytes added, 13:02, 29 January 2021
m
Part 3: Using Shell Scripts for VM Backup & Management: - putting backups in normal users backups directory
&nbsp;do<br>
&nbsp;&nbsp;echo "Backing up VM #$num"<br>
&nbsp;&nbsp;gzip < /var/lib/libvirt/images/centos$num.qcow2 > ~/backups/centos$num.qcow2.gz<br>
<br>&nbsp;&nbsp;echo "VM #$num BACKUP DONE"<br>
&nbsp;done<br><br>
&nbsp;done<br>
&nbsp;echo "Backing up VM #$numanswer"<br>
&nbsp;gzip < /var/lib/libvirt/images/centos$numanswer.qcow2 > ~/backups/centos$numanswer.qcow2.gz<br><br>
&nbsp;echo "VM #$numanswer BACKUP DONE"<br>
else<br>
932
edits