Lab Snapshots and Backups
Total Page:16
File Type:pdf, Size:1020Kb
IST346: Lab Last Update: 4/7/2010 2:04 PM
LAB– SNAPSHOTS AND BACKUPS
OVERVIEW
In this lab you will explore how snapshots and backups work.
LEARNING OBJECTIVES
Upon completion of this lab, you should be able to
Setup Volume Shadow Copies (VSS)
Restore files over a share using VSS
Learn to create backups of your systems and data.
LAB BREAKDOWN
This lab consists of 2 parts:
1. Snapshots with Volume Shadow Copies
2. Performing workstation backups
REQUIREMENTS
Before you start this lab you will need:
1. These virtual machines,
a. Win2008 (Windows Server 2008) – acting as a server
b. Centos5 (Centos Linux 5) – acting as a server
c. Win 7 (Windows 7) – acting as a workstation
2. Startup the Win2008, Centos5 and Win7 virtual machines:
a. Logon to Win2008dc as Administrator (the account with the most access on the Windows platform)
Page 1 IST346: Lab Last Update: 4/7/2010 2:04 PM
b. Logon to Centos5 as root (the account with the most access on a *nix platform)
c. Logon to Win7 as user (a non-privileged account)
d. Remember, in all cases, the password is SU2orange!
Page 2 IST346: Lab Last Update: 4/7/2010 2:04 PM
PART 1 – SNAPSHOTS WITH VOLUME SHADOW COPIES SERVICE (VSS)
OVERVIEW
Snapshots are point-in-time copies of files and folders. Snapshots in the Windows operating system are called Volume Shadow copies. As the name indicates, the must be configured at the volume level, and you cannot setup shadow copies for a folder or single file.
The Volume Shadow Copy Service (VSS) must be enabled on the local volume, but the feature can only be used over a network file share. This is by design so that the file recovery process can be placed in the hands of the end user.
This section will demonstrate how to configure and use shadow copies. We will configure the service on our Win2008 VM, and use it from the Win7 workstation on our Home folder \\win2008.ad.fauxco.com\share\homes\titupp which is mapped to the H: drive.
To prepare for configuring shadow copies, please do the following:
1. Log-on to your Win2008 virtual machine as Administrator
2. Log-on to your Win7 virtual machine as Tally Itupp (titupp) Or any other average domain user.
1.A VOLUME SHADOW COPIES FROM THE USER’S PERSPECTIVE.
As explained earlier the VSS runs over a physical server volume, which is exposed to the users over the network as a file share using WFS (Windows File Sharing).
From Win7: logged in as titupp
1. Open Computer from the start menu.
2. Right click on the H: drive, and choose Properties from the menu. NOTE: if you do not have an H: drive then you did not complete the previous lab. Please do that first.
Page 3 IST346: Lab Last Update: 4/7/2010 2:04 PM
3. You should see a Previous Versions tab in the dialog. It’s empty since we haven’t configured the service.
4. Close the dialog.
5. Now Check the Previous Versions for the C: drive. (Right click, properties) You may see some shadow copies here for example:
Page 4 IST346: Lab Last Update: 4/7/2010 2:04 PM
Why? This is because Windows 7 enables this service by default. This is one of the many safeguards built into the Windows operating system. As we will see with shadow copies, their quite useful for used- initiated restores of data.
6. Close the dialog
What good is any backup unless there are actual files to back-up? In this step we will make two “very important documents” and save the documents to Tally’s home directory.
1. From the start menu, launch the WordPad program
2. Enter the text “This is a very important document” into Wordpad.
3. Save the document to your H: drive as important_document_1
4. Close WordPad
5. Repeat steps 1-4 this time saving the document as important_document_2
6. Verify the files are in the proper location. Open the H: drive and you should see this:
If you see both files, it’s time to setup shadow copies so we can see how user initiated file restores work!
Page 5 IST346: Lab Last Update: 4/7/2010 2:04 PM
1.B SETTING UP THE VOLUME SHADOW COPY SERVICE
Next we will setup volume shadow copies on the Windows 2008 file server.
From Win2008: logged in as Administrator
1. Open Computer from the start menu.
2. Right click on the C: drive, and choose Properties from the menu
3. You should see a Shadow Copies tab in the dialog. Click on it.
Page 6 IST346: Lab Last Update: 4/7/2010 2:04 PM
4. Click Enable to turn the service on. Click Yes on the “Enable shadow copies” dialog warning. (Explains the default copy schedule.)
5. When VSS is first enabled, notice it takes a snapshot of the volume. The default setting takes TWO shadow copies each day. This is more than sufficient for this demonstration.
6. Keep this dialog open and return to your Win7 VM
Page 7 IST346: Lab Last Update: 4/7/2010 2:04 PM
1.C RESTORING YOUR OWN FILES
From the Win7 VM:
1. Return to the Previous Versions dialog for the H: drive. Notice now there is one shadow copy.
2. Now it’s time to put the shadow copy to work.
3. Close the Previous Versions dialog.
4. Open the H: drive
5. Delete the file important_document_1
6. Edit important_document_2 by double-clicking on it. Replace the text in the file with “You have a virus!” and then save the file.
7. Bummer. We accidentally deleted a file and one got changed by a virus! Aaagh! What are we going to do?!?!?! Yes, this major drama is intentional. It’s no problem we can use our shadow copy to retrieve a previous versions of the files!
Page 8 IST346: Lab Last Update: 4/7/2010 2:04 PM
8. Leave the H: drive folder open. Move the window to the top of your computer screen. Bring open the Previous Versions dialog one more time. (Right-click on H:, properties)
9. Click on the one shadow copy and click open. A new window opens, showing the folder contents as they were at the time of the shadow copy! With a little window management, your desktop should look something like this:
10. To restore your files, simply highlight and drag and drop the important documents from the previous versions folder to your H: drive. (In the screenshot above I would drag from the bottom window up).
Page 9 IST346: Lab Last Update: 4/7/2010 2:04 PM
11. When you see the Internet security warnings window, click Ok.
12. Perform a Copy and Replace at the copy file dialog.
And when you’re done the files are back from the dead!
13. Close all dialogs and windows.
14. Reopen the H: drive folder and check out the important documents. Oh joyous day! They’re back!
Page 10 IST346: Lab Last Update: 4/7/2010 2:04 PM
1.D THE MANAGER’S PERSPECTIVE – HOW MUCH IS THIS COSTING ME?
In class we discussed the fallacy of enterprise storage which at its most basic level says that if a user Tally requires 1 GB of storage, she will actually consume 6 to 8GB of raw enterprise storage resources in the process. Nice, convenient “feel good” insurance policies like volume shadow copied are one of the factors that contribute to the variance between what the user sees as storage as what is actually stored.
At this point you might ask yourself: How much space is this taking up, anyways? It’s a good question, and every good SA should know how much disk space is allocated to and consumed by the VSS. It’s a good practice to help you understand the real costs of this type of service.
Go back to your Win2008: VM logged in as Administrator
1. Open up the Shadow copies dialog on the C: drive once more.
2. Notice the amount of used space for shadow copies.
Page 11 IST346: Lab Last Update: 4/7/2010 2:04 PM
3. Click the Create Now button 4 times to create 4 additional shadow copies.
Notice how the number goes up with each shadow copy – and we’re not even changing actual files on the volume!
4. Next, Click on Settings… and then Details… to view the amount of space used by and reserved for shadow copies.
Page 12 IST346: Lab Last Update: 4/7/2010 2:04 PM
Right now, worse case shadow copies will use 1.6GB. These numbers can be adjusted to meet storage limitations and shadow copy frequency requirements.
5. Close all open dialogs.
As you can imagine the space on the volume can get used up rather quickly. Remember disks are cheap but storage is not……and lost time and productivity are the costliest of all resources.
PART 2 – WORKSTATION BACKUPS
In this second part we will introduce the concept of workstation backups. VSS Snapshots work wonders for network-stored files, but what about the files that might not be stored on the network or cases where files CANNOT be stored on the network – such as notebook computers? In these situations we need a different strategy one more in line with traditional backups
From the Win7 VM, logout as AD\titupp and log back in as AD\Administrator -
Page 13 IST346: Lab Last Update: 4/7/2010 2:04 PM
2.A SETTING UP YOUR FIRST BACKUP
1. Create the backup folder. Open the network share \\win2008.ad.fauxco.com\shares and create a new folder called backups for example, you should see:
2. Keep the window open you’ll need it for restores later.
3. Run the Backup and Restore application from the Start Menu. This is the utility we will use to run backups.
Page 14 IST346: Lab Last Update: 4/7/2010 2:04 PM
4. Create a new backup (Click Set up backup). You will see this dialog, instructing where to save your backup.
Click the Save on a network… button.
5. For the network location, enter \\win2008.ad.fauxco.com\Shares\backups , for credentials, enter AD\administrator and the administrator password.
Page 15 IST346: Lab Last Update: 4/7/2010 2:04 PM
Click Ok when you’re ready.
Page 16 IST346: Lab Last Update: 4/7/2010 2:04 PM
6. You will now see the share as a saved backup location:
Click on the shared location, and click Next.
Page 17 IST346: Lab Last Update: 4/7/2010 2:04 PM
7. Next you will be asked “What” you’d like to backup.
Select Let Me Choose and click next. (These virtual machines don’t have enough space to back upthe entire Win7 system setup)
8. You will then see a list of data to back up, clean the checkbox at the bottom which includes a system image:
Page 18 IST346: Lab Last Update: 4/7/2010 2:04 PM
When you’re ready, click Next.
9. At the final setup click change schedule. For this demonstration, we don’t want the backup running each Sunday, we would like to run it on demand.
Page 19 IST346: Lab Last Update: 4/7/2010 2:04 PM
Clear the Run backup on a schedule checkbox.
Page 20 IST346: Lab Last Update: 4/7/2010 2:04 PM
then click Ok and then Save Settings and Exit
Page 21 IST346: Lab Last Update: 4/7/2010 2:04 PM
10. At the Backup and Restore application you can now click the Back up Now button to run a backup.
11. It might take some time to execute the backup. The size of the backup is about 65MB.
2.B SIMULATING WHAT NORMALLY HAPPENS ON A USER’S WORKSTATION
Next we will create some documents and perform a few more backups we do this so we can simulate the value of backups and the backup catalog. Here’s our plan. Make a file. Backup. Delete file. Make another File. Backup. Delete file.
We will then you the backup catalog to restore both files (even though they are in different backups)
1. Open the Documents folder in the start menu. Note: This is not a network folder it is local to the C: drive
2. Right click in the empty folder and create a new Rich Text Document name it document1
3. Double click on document1 and add the text “This is document 1” to the document and then save.
Page 22 IST346: Lab Last Update: 4/7/2010 2:04 PM
4. Now let’s make a backup! From the Backup and Restore application click the Back up Now button.
5. Let the backup run and wait for it to complete successfully!
6. Now go back to the Documents folder. DELETE the document1 file.
7. Follow the step 2 and 3 again, but this time create a document2 file.
8. Make another backup.
9. Let the backup run and wait for it to complete successfully!
10. Now go back to the Documents folder. DELETE the document2 file.
11. If you did the 10 steps correctly, you should have no files in Documents. In addition There should be backups of Win7 inside \\win2008x.ad.fauxco.com\Shares\backups\Win7\ should contain the 4 backups and the catalogs folder.
12. This is all fine and dandy, but backups were never meant to be accessed in this fashion! Read on…
2.C RESTORING FILES WITH BACKUP
What was that all about? Well you just created 2 files captured them each in their own backup and then deleted both files. Now it is time to restore both files from the backup.
1. Open the Backup and Restore application, click on Restore My Files
2. Click Browse for Files from the Restore Files dialog.
Page 23 IST346: Lab Last Update: 4/7/2010 2:04 PM
3. From the dialog, select Administrator’s backup and then Documents you should see both documents.
Notice how backup stores the file data independent of when the actual backups took place. You don’t need to know which backup to retrieve in order to properly restore the file. This is courtesy of something call the global backup catalog – a database of what was backed up and when. Very cool.
4. Hold down the CTRL key while clicking on both documents. This will allow you to select both files when you click the Add Files button.
Page 24 IST346: Lab Last Update: 4/7/2010 2:04 PM
5. Next, you will see the restore files dialog which shows you which files are to be restored from backup.
Click Next to begin the restore process.
6. Select In the Original Location for the restore location. Click Restore to restore the files. Click Finish when the restore completes.
7. Do back to the Documents folder. You should now see both files! Restored from backup! Awesome!
Page 25