Section 3.7. Using Shadow Copies


3.7. Using Shadow Copies

Shadow copies are a new technology within Windows products that enables a server to take snapshots of documents on a disk to record their states at certain points in time. If a user accidentally deletes or otherwise overwrites a file, he or she can open a version the server saved earlier in time, thereby eliminating the need to either recreate his or her work or contact the help desk to get them to restore the file from the most recent backup. When shadow copies are enabled on a disk, clients connecting to a share on that disk will be able to view and access previous point-in-time copies of either individual files or entire directories.

Further benefits lurk beneath the surface of this feature, however. The service behind shadow copies, called the Volume Shadow Copy Service (VSS) , is actually responsible for a newly developed application programming interface (API) that allows server-based applications such as Exchange, SQL, and backup programs to take advantage of the benefits of shadow copies. Perhaps the most famous example is a backup that skips open files, either because they are currently open by a user or because they are locked by another process. In the past, this resulted in incomplete backups, either because the backup process halted in midstream because of this unrecoverable error, or because the process skipped the open file. If the open file is, say, your Exchange email database, that's not necessarily a good thing. But now, with volume shadow copies, the backup application can simply use an API to take a snapshot of any open files and back up that snapshot. Now you have an instant backup of a database at any point in time, with no interruption in availability to the user. This is a very nice feature.

You definitely can take advantage of shadow copies in the user realm as well. Part of the volume shadow copy service is a piece of client software that can be pushed out to any computer in your domain through Group Policy. (This software is located on the Windows Server 2003 CD and can also be downloaded from Microsoft's web site.) Once the user has this client, Windows adds a tab to the Properties sheet for any document. This is shown in Figure 3-25.

Figure 3-25. The Previous Versions add-on for the Volume Shadow Copy Service


To restore a previous version of a file, all the user has to do is select the appropriate version and either copy it to a different location using the Copy button, or restore it to its location at the time the snapshot was taken by using the Restore button. (This will overwrite the newer version because it's assumed that when a user wants to restore a previous version, he doesn't want the current version.) Note that viewing an executable file will run that file.

To reduce user confusion, when a user accesses the Previous Versions link in the Explorer view (in Windows XP, the only client version of Windows that currently supports Previous Versions) of a particular share, he or she is presented only with a list of unique copiesthat is to say, a list of versions that differ from each other, a condition that indicates the file or folder changed. In addition, shadow copies are read-only, in that users can copy, drag-and-drop, and perform any other function on them as usual except for overwriting or deleting them.

Some restrictions on shadow copies from an administrator standpoint are noted as follows:

  • Local views of folders on a disk do not permit accessing shadow copies. For the Previous Versions link to appear in a folder's view, you must be accessing that folder from a network share.

  • The Windows XP clients that require the Previous Versions update can find it (on any Windows Server 2003 system) inside the %systemroot%\system32 folder; its name is TWCLI32.MSI. It is installed by default on all Windows Server 2003 machines. It also can be pushed out, as discussed earlier, through a GPO.

3.7.1. Enabling Shadow Copies

To enable shadow copies on the server, follow these steps:

  1. Open the Control Panel and double-click Computer Management.

  2. Expand Computer Management, System Tools, and Shared Folders.

  3. Right-click Shared Folders, select All Tasks, and click Configure Shadow Copies.

  4. Select the disk on which to enable shadow copies, and click Enable.

When you enable shadow copies on a volume, the system creates a folder on that volume called System Volume Information, where the actual snapshots and log files of the operations are stored. By default, this folder is allocated 10% of the volume's total disk space, much like the Recycle Bin default in Windows.

When you first enable shadow copies, a current snapshot of the volume is taken so that Windows can store a picture of the "state" of files on the disk. This state data is used to determine if files have changed from the time at which the state information was recorded. For example, an administrative assistant is performing rudimentary formatting functions on an Excel spreadsheet and she leaves for the day. Overnight, the Windows Server 2003 machine on which the file share resides is configured to take a snapshot of all filesfor this example, I will use 5:30 a.m. When this snapshot is taken, the state information for this Excel spreadsheet is copied into the System Volume Information folder. Now, when the administrative assistant arrives at work and begins to work on the spreadsheet, she is using the same version as the one she saved the previous night; remember that this is also the one on which the snapshot is based. When she finishes with some formatting, she saves the spreadsheet before she attends the Tuesday morning meeting of all employees. The VSS service detects that the Excel file is one which already has state data, and it realizes that it has changed, so it immediately makes available the 5:30 a.m. version of the filethe previous versionunder the appropriate tab in the Properties sheet for the Excel file. So now, when the administrative assistant comes back and realizes that she unintentionally removed an entire page from the workbook while she was formatting the file, she can retrieve the version from the previous night, and likely save her job.

You should, however, note three very important items concerning how shadow copies might and (most notably) might not rescue you or your users from catastrophe:

  • You can only restore the shadow copy of a file that consisted of the oldest modification since the most recent snapshot. Even if multiple changes are made to a file throughout the day, the only previous version available for rollback is the one that was made directly after the most recent snapshot. This can be somewhat counterintuitive to understand, but it's crucial that your users not rely on the previous versions feature as a crux and learn to use it only when a major disaster strikes.

  • If you rename a file, you lose all access to previous versions of that file, even if some exist. VSS tracks exclusively by filename and state, so if the filename changes, VSS (at least at this stage) isn't smart enough to follow the rename.

3.7.2. Altering the Shadow Copy Schedule

Shadow copies are scheduled by default to be made at 7:00 a.m. and at noon on weekdays. Server performance can be adversely affected if you schedule shadow copies to be taken more frequently than once every 60 minutes.

Because the times at which shadow copies are made can be a good ways apart in the work day, it's best to remind users that the shadow copy functionality is not a crutch and that the best way to ensure that no data is lost is to save early and often.


Additionally, as soon as 64 shadow copies per volume are stored, the oldest will be deleted and become irretrievable as new shadow copies are made to replace them.

To change the shadow copy schedule, follow these steps:

  1. Open the Control Panel, and double-click Computer Management.

  2. Expand Computer Management System Tools Shared Folders.

  3. Select the disk on which to modify the shadow copy schedule, and then click the Settings button.

  4. Click the Schedule button in the box that appears next.

  5. Change the schedule as appropriate.



Learning Windows Server 2003
Learning Windows Server 2003
ISBN: 0596101236
EAN: 2147483647
Year: 2004
Pages: 171

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net