Changes

Jump to: navigation, search

OPS245 Lab 2 dev

18 bytes removed, 22:32, 29 January 2023
Part 1: Backing Up Virtual Machines
# Use the command <b><code><span style="color:#3366CC;font-size:1.2em;">sudo -i</span></code></b> and enter your password if prompted. You are now root until you use the command '''exit''' to return to your normal user account.
# Change to the images directory by issuing the following command: <b><code><span style="color:#3366CC;font-size:1.2em;"> cd /var/lib/libvirt/images/</span></code></b>. Note that you did not need to use sudo, as you are already using elevated permissions.
# Make a compressed backup of your '''centos1rhel1.qcow2''', '''centos2rhel2.qcow2''', and '''centos3rhel3.qcow2''' files to your regular user's home directory by issuing each command - one at a time :<br><b><code><span style="color:#3366CC;font-size:1.2em;">gzip < centos1rhel1.qcow2 > ~YourRegularUsername/backups/centos1rhel1.qcow2.gz</span></code></b><br><b><code><span style="color:#3366CC;font-size:1.2em;">gzip < centos2rhel2.qcow2 > ~YourRegularUsername/backups/centos2rhel2.qcow2.gz</span></code></b><br><b><code><span style="color:#3366CC;font-size:1.2em;">gzip < centos3rhel3.qcow2 > ~YourRegularUsername/backups/centos3rhel3.qcow2.gz</span></code></b><ul>'''NOTE:''' Make certain to use the redirection signs "<" and ">" properly in the command!</ul>
{{Admon/important |Please be patient|It may look like the command prompt is stuck but it could take a while for gzip to compress an entire operating system. '''NOTE:''' Do NOT press '''&lt;ctrl&gt;c''' to cancel this process. If you do, your archive will become incomplete and your recovery will be corrupt.}}
<ol><li value="7"> Compare the size of the compressed and original files (hint: use '''ls -lh'''). If file is very large (like 15GB), you didn't compress it and you need to remove that file and perform the previous step until you get it right!</li>

Navigation menu