Changes

Jump to: navigation, search

OPS335 Lab 1

835 bytes removed, 07:25, 18 January 2017
Performing Full Backups
=== Performing Full Backups ===
A full backup is backup represents backing up of all of the files on of a systemcomputer machine (in our case, a VM). Since it may take a long time, this A full backup is NOT should be performed on a daily basisat the end of each lab or assignment working session.
In OPS235, you learned to use the '''gzip''', '''gunzip''', and '''virsh dumpxml''' / '''virsh define''' commands to backup your virtual machines and the '''tar''' command as an archiving tool.
 In this lab, we We will expose you to use the '''dump''' and '''restore''' utilities in order to perform full backups of your VMs. You should be using this utility same method to perform a full backups of all of your VMs (both lab backup for these labs and assignment) prior to leaving your OPS335 lab sessionassignments.
'''Perform the following steps:'''
#Make certain that your virtual machines are NOT running.
#Make certain that you are logged in as root user on your host machine.
#From Refer to OPS235 lab2 on backing up your vm1 machine, make a cloned virtual machine called '''backup-test'''#On your host machine, run VMs using the following commandsgzip command [https:<br><source lang=bash>mkdir -p /backup/fulldump -z100 -f /backupwiki.cdot.senecacollege.ca/fullwiki/backupOPS235_Lab_2_-test /var/lib/libvirt/images/backup_CentOS7_-test.qcow2</source>_HD2#When the backup operation has been completed, issue the following command to determine the file-typePart_1:<br><source lang=bash>file /backup/full/backup_Backing_Up_Virtual_Machines OPS235 Lab2 -test</source>Backing up VMs]#What is type of file is this? Use the Make certain that you have performed a full backup for '''vm1''', '''vm2''', and '''ls -lhvm3''' command to determine the size of this file.#Remove the vm you just created by issuing the follow command:<br><source lang=bash>rm /var/lib/libvirt/images/backup-test.qcow2</source>#Try launching It is recommended to create a Bash shell script to automate the backup-test VM from the virtual machine managerbacking up of ALL your VMs in sequence. Did it work?#Issue the following command to restore the backup-test VM You can do this by issuing the following command:<source lang=bash>restore -x -f /backup/full/backup-test</source>#After restoration is completerunning a for loop using a list for vm1, vm2, try launching the backup-test VM from your virtual machine managerand vm3. Were you successful? 
#Create the sub-directory '''/root/bin'''
#Create a Bash shell script called '''/root/bin/mybackup.bash''' that will backup all of your other vms (i.e. vm1, vm2, and vm3) one at a time using the '''dumpgzip''' command into the respective path-names: '''/backup/full/vm1''', '''/backup/full/vm2''', and '''/backup/full/vm'''
#Set execute permissions, and run the shell script to verify that you shell script works.
#You can '''undefine the backup-test''' VM in the virtual machine manager and remove the image file for that VM in the '''/var/lib/libvirt/images''' directory.
13,420
edits

Navigation menu