IST346: Lab Last Update: 4/2/2010 11:59 AM

L09 – 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. Your PSD (Portable Storage Device) connected to a lab computer, or a computer running VMware Server 1.09 / VMware Workstation 6.X.
  2. You must complete the previous lab prior to working on this one.
  3. These virtual machines, from the VM Garden, on your PSD:
  4. Win2008x (Windows Server 2008) – acting as the server (domain, file)
  5. Vista1 (Windows Vista) – acting as a workstation, domain-bound to ad.fauxco.com
  6. Make sure both virtual machines are on the VMnet8 network.

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 Win2008x VM, and use it from the Vista1 workstation on our Home folder \\win2008x.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 Win2008x virtual machine as Administrator
  2. Log-on to your Vista1 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.

From Vista1: logged in as titupp

  1. Open Computer from the start menu.
  2. Right click on the H: drive NOTE: if you do not have an H: drive then you did not complete the previous lab. Please do that first.
  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. You may see some shadow copies here. This is because Windows Vista enables this service by default. The reason it’s C$ and not C: is because all shadow copies must be access over a network file share and C$ represents the shared version of the Vista1 computer’s hard disk drive labeled C:
  6. Close the dialog

What good is any backup unless there are actual files to back-up? J

  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.

1.b Setting up the Volume Shadow Copy Service

Next we will setup volume shadow copies on the server.

From Win2008x: logged in as Administrator

  1. Open Computer from the start menu.
  2. Right click on the C: drive
  3. You should see a Shadow Copies tab in the dialog. Click on it.
    Unconfigured Shadow Copies
  4. Click Enable to turn the service on. Click Ok on the enable shadow copied dialog warning of the default schedule.
  5. When VSS is 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 Vista1 VM

1.c Restoring your own files

From the Vista1 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. No problem we can use our shadow copy to retrieve a previous version of the file.
  8. Leave the H: drive folder open. Bring open the Previous Versions dialog one more time.
  9. Click on the one shadow copy and click open. You desktop should look something like this:
  10. To restore your files, 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).
  11. Perform a Copy and Replace and when you’re done the files are back from the dead!
  12. Close all dialogs.

1.d The manager’s perspective – how much is this costing me?

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.

Go back to your Win2008x: 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.
  3. Click the Create Now button 4 times. Notice how the number goes up with each shadow copy – and we’re not even changing files on the volume!
  4. Click on Settings… and then Details… to view the amount of space used by and reserved for shadow copies.
  5. Close all open dialogs.

As you can imagine the space on the volume can get used up rather quickly. This is yet another example of the fallacy of storage: Disks are cheap but storage is not!

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 Vista1 VM, logged in as AD\Administrator - you might need to logoff as titupp.

2.a Setting up your first backup

  1. Create the backup folder. Open the network share \\win2008x.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 Center from the Start Menu. This is the utility we will use to run backups.
  4. Create a new backup (Click on Backup files). Choose backup to the network \\win2008x.ad.fauxco.com\Shares\backups you will be asked to authenticate to the share: Logon as AD\Administrator
    Note: these credentials are saved with the backup job.
  5. When asked which files you wish to back up, select all the file types.
  6. Change the backup schedule to Monthly (note we will run the backup manually)
  7. When you’re done click Save Settings and Start Backup
  8. While the backup is progressing you can see the files and folders being created in \\win2008x.ad.fauxco.com\Shares\backups

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.
  4. Now let’s make a backup! From the Backup and Status Configuration 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 your backup set folder inside \\win2008x.ad.fauxco.com\Shares\backups\VISTA1\ should contain the3 backups and the catalogs folder.

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. Close all Backup windows.
  2. Double-click on the globalGatalog file in the Catalogs folder of your Backup Set located at \\win2008x.ad.fauxco.com\Shares\backups\VISTA1\
  3. This will launch the Backup Status Configuration window in Restore mode.
  4. Click Restore Files
  5. Click From Latest Backup
  6. Search for document and restore both the document1 and document2 files. Click Add, then Next.
  7. Restore to the original location and click Start Restore
  8. Verify the files are present in the Documents folder! Cool!

Part 3 – Running the Lab Checker Script.

This lab will be checked/ graded with a lab-checker script. You will download this script to your win2008x virtual machine and then run it. It will verify you have performed the steps outlined in the lab

  1. Logon to your win2008x VM as Administrator. (If you’re not already)
  2. Download the script to the Documents folder. Save as L09-Check.ps1
  3. Click on Windows Powershell in the Windows start menu. This will open the powershell command prompt.
  4. Execute the lab checker by typing .\Documents\L09-Check.ps1

Page 9