Changes

Jump to: navigation, search

OPS335 Lab 1

410 bytes added, 08:27, 14 January 2016
no edit summary
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 course, you are taught other more practical methods of performing backups for Linux systems including:
*'''cpio'''*'''dump ''' / '''restore'''
In this lab, we will focus on a method to provide automatic backups of your VMs to your host machine as opposed to performing full and incremental backups (although it is recommended to study these techniques since they may be useful at some point in a later lab, and will be useful in later courses). We will now focus on using the rsync command for backing up our VMs.
'''Rsync''' is a very versatile backup tool. As the name suggests, rsync is used for <u>synchronizing</u> files typically across a network. It works over the '''SSH''' protocol, which is useful in our situation since we are running ssh on our server and VMs. You are going to use your ''host machine'' to backup files from the ''virtual machines''.
 
'''Perform the following steps:'''
# Make certain that all of your VMs are vm1 machine is running.
# On your '''host machine''', run the following commands:
rsync -avz 192.168.x.2:/etc /backup/vm1/</source>
<ol><li value="3">If rsync asked prompts for a password - , make sure certain that you completed the '''SSH keys part of the labkey''' section above, and that you're using assigned the keys for the correct appropriate user. If you get a ''different error - perhaps '', check to see that rsync is installed, and if not installed, install that application. What </li><li>when the rsync command runs correctly, you should see is all the files from vm1 being copied over. Rerun </li><li>Run the rsync commandagain. Notice that the second time nothing is copied over - that's because there would be no point, none of the files have changed on vm1. </li><li>Create a new file in vm1's '''/etc/ ''' directory, and rerun '''rsync'''. Notice Confirm on your '''host machine''' that only that file gets copied over.</li><li>Repeat the above steps to create backups for your vm2 and vm3 machines on your host machine as well (for the respective directories: '''/backup/vm2''' and '''/backup/vm3''').</li></ol>
== Scheduling Tasks (Cron) ==
13,420
edits

Navigation menu