Web Abstract:
- Volume Shadow Copy Service creates snapshots of files so users can restore deleted files themselves.
- VSS can back up SQL Server or Exchange files that are open or locked.
- Configuring and monitoring backups with VSS in Windows 2003 isn't difficult.
- Tips for implementing VSS can help you more efficiently set up Volume Shadow Copy Service.
|
Volume Shadow Copy Service (VSS) offers two features that can save you time
and peace of mind. The first is a snapshot—think of it as a short-term
backup—of all the files on an NTFS volume. This snapshot, or shadow
copy, lets your users restore files for themselves—for example, if
they accidentally delete a file or choose Save when they meant Save As. (VSS
is not designed to replace your current backup strategy, as I discuss later.)
The second feature is VSS's ability to back up files that are currently open
or locked by an application such as Microsoft SQL Server or Microsoft
Exchange.
VSS creates shadow copies on a regular basis or whenever you tell it to. Using VSS in Windows 2003 and in Vista's
System Restore is easy—let's take a look at how to configure
and monitor backups with VSS in Windows 2003, then
discuss how converting basic disks to dynamic disks might
affect your shadow copies. Later, as you implement VSS, you
might want to refer to the list of VSS tips I've included.
How VSS Works
VSS creates snapshots of all files on an NTFS volume, aka the source volume.
The shadow copies themselves reside in an area called the shadow copy cache. The
volume that holds the shadow copy cache is called the shadow copy storage volume.
Chances are you'll never see the shadow copy cache, because it lives in the System
Volume Information folder, which is a hidden system folder.
By default, the shadow copy cache is created on the
source volume, but you can specify that it be created on
a physically separate disk to boost performance and provide fault tolerance. You need to decide where to store the
shadow copy cache before you enable VSS, because you
can't move the cache later without losing all the snapshots
it contains. Also, note that disabling shadow copies on a
volume permanently deletes all existing shadow copies.
VSS can be enabled only on NTFS volumes. You can't
choose to include or exclude specific files or folders—it's
all or nothing. Data residing in mounted volumes isn't
included in the shadow copy of the parent volume. However, you can enable shadow copies on mounted volumes
themselves. Note that shadow copies preserve both
encryption and NTFS permissions, which might cause
problems when you restore a file.
Enabling VSS
To enable VSS, click Start, choose My Computer, then rightclick the volume on
which you want to enable VSS and choose Properties. On the Properties page,
click the Shadow Copies tab. If you haven't already done so, decide whether
you want to store the shadow copy cache on another volume that's located on
a different disk.
Next, highlight the source volume and click Settings. In the Settings dialog
box, you can select a different volume to be the shadow copy storage volume,
as Figure 1 shows. You can change the size
of the storage area and change the schedule (click the Schedule button) if the
default schedule doesn't fit your needs. The default schedule creates snapshots
Monday through Friday at 7 a.m. and at noon. You should create snapshots only
as necessary—once an hour might be overkill.
After you configure your settings, click OK.
On the Properties page, click Enable to turn
shadow copies on for that volume. You'll be
asked whether you want to use the default
schedule and settings; go ahead and click Yes,
then click OK again.
If you enjoy using command-line utilities,
as I do, you'll want to learn how to use Vssadmin and Schtasks instead of the GUI to configure VSS. Vssadmin lets you create, delete, and
resize shadow copies, among other things. Use
Schtasks to create, edit, and delete scheduled
tasks.
Let's talk about how much disk space you might need. When you enable VSS, 100MB
of storage space is allocated immediately, and VSS can use up to 10 percent
of the space on the hard disk. Snapshots record only what has changed since
the last snapshot, so they don't take up as much room as you might think. However,
a shadow copy cache can store only 64 shadow copies. If you run out of disk
space or create a 65th snapshot, the oldest snapshot is deleted to make room
for the new one. Due to the overhead of creating snapshots, I recommend enabling
VSS only on volumes that hold user data or on which you'd like to be able to
back up open files.
Using Windows 2003 Shadow Copies
To let client computers access previous versions of files, you need the Previous
Versions Client application, which comes with Vista and Windows 2003. You can
also install the Previous Versions Client on Windows XP Professional SP1 (you'll
find the twcli32.msi file in the %Windir%\System32\Clients\ Twclient\X86
folder on the Windows 2003 CD-ROM) and on Windows 2000 (download the Win2K
version from the Microsoft Web site at http://www.microsoft.com/downloads/details.aspx?amp;displaylang=en&familyid=e382358f-33c3-4de7-acd8a33ac92d295e&displaylang=en).
To install the client on users' PCs, double-click the file or deploy it through
Group Policy or Microsoft Systems Management Server (SMS).
Shadow copies were designed to be used with the Common Internet File System
(CIFS—an enhanced version of the Server Message Block protocol), so to
access previous versions of a file or folder on a server, you must connect through
a shared folder. Even if you're logged on to a server, you need to connect through
a Universal Naming Convention (UNC) path. For example, to access the previous
versions of a file that's stored on a server named UptownDC in a shared folder
named Sales, you'd click Start, Run and type
\\Uptowndc\sales
Click OK, then right-click the file you want to see and select Properties.
The Previous Versions tab lists the snapshots and shows the date and time they
were taken, as Figure 2 shows. You'll also
see three options: View, Copy, and Restore. View opens a read-only copy of the
file, which is useful for determining which previous version you need. The Restore
option restores the document and its NTFS permissions and encryption settings
to the original location, overwriting the current version. The safer choice
is Copy, which lets you copy the file to a new location.