Complement Your Win2k3 Backup Regimen with VSS

Welcome back to our look at the Volume Shadow Copy feature of Windows Server 2003. In part one we looked at what the Volume Shadow Copy Service (VSS) does, and how you go about configuring and enabling the feature. In this article we’ll look at how you access files created by VSS, restore previous versions of an existing file, and restore deleted files.

Accessing Files Created By VSS

Although the process of enabling VSS is performed through the Properties page of the appropriate drive in My Computer, you cannot access the files created by VSS through this interface. Instead, you need to use client software. Windows Server 2003 comes installed with the VSS client software, but for the other operating systems (Windows XP, Windows 2000 and Windows 98) you’ll need to install it from the %Systemroot%System32ClientsTwclient folder on a Windows Server 2003 system.

The client software is included as an .msi package, which makes it suitable for distribution through Group Policy, or you can just email the package to clients. Of course you could also create a share on that folder, or place the package in another accessible location. Installation of the client software involves just two mouse clicks – one to start the installation, and another for the Finish button. There are no configuration parameters or other options, which should make for easy rollout.

The decision to allow users to retrieve shadow copies of files is an interesting one. Personally I prefer that only the most technically savvy users have access to such features, which makes prudent distribution of the client necessary. In some smaller environments you may even choose to not provide clients with access to shadow copy file retrieval at all, and handle all related tasks yourself. In this case, you can either load the VSS client software onto only your workstation, or use a Windows Server 2003 system. For the purposes of this demonstration, I’ll continue to use the Windows Server 2003 system that I enabled VSS on in the first place. There is, however, one very important step to be aware of if you also choose to use a server for shadow copy file retrieval.

An important consideration with VSS is that you can only access shadow copies of files through a share. So, if you are trying to see previous versions of a file on a Windows Server 2003 system where the shadow copies are stored, you will first need to map a drive to the corresponding share. There are numerous ways to do this, but probably the easiest is to click Start, Run and then type localhost in the Open box. When the list of shares on the system is displayed, simply right-click the share from which you want to retrieve a shadow copy file and select Map Network Drive. A dialog will then appear with an automatically selected drive letter. Click Finish, and the drive will be mapped.

To see previous versions of a file, first locate the file within the share. Then, right-click the file and select Properties. Click the Previous Versions tab, and you will be able to see all of the versions of the file that are available for restoration. As discussed, if you are using a Windows Server 2003 system for this process and are missing the Previous Versions tab, make sure you are accessing the file via a share. You can see an example of the Properties dialog, along with two shadow copies of a file in Figure 1.


Figure 1.
(Click for a larger image)

From the Previous Versions tab, you have three choices. You can either open the previous version of a file to determine whether you want to restore it, copy the file so that it can be pasted to a different location, or restore the file. It is important to remember that restoring the file overwrites the file that is currently on the disk, so it goes without saying that you should be absolutely sure this is what you want to do. A warning message to this effect appears when you choose to restore a file.

One commonly asked question when it comes to restoring shadow copies of files is ‘what happens when I want to restore a file that has been deleted?’ It’s a valid question, because if the file is not still on the disk, how are you supposed to locate it to see the previous versions? As you would expect, Microsoft thought of this when designing VSS, but the process of recovering a deleted file is slightly different than when simply recovering a previous version of an existing file.

Recovering Deleted Files

To recover a deleted file, first go to folder within the share from where the file or folder was deleted. Then, right click anywhere on the screen in the blank space of that folder, and select Properties from the shortcut menu. From the Properties dialog, click the Previous Versions tab. A list of the shadow copies made for that share will be displayed, as shown in Figure 2. Note that for the purposes of demonstration, I have my VSS schedule running every five minutes. You are very unlikely to configure such a frequent setting in a live environment.


Figure 2.
(Click for a larger image)

Next, select the shadow copy from which you want to recover the deleted file. You’ll need to figure out the exact time that the file was deleted, and then choose the last shadow copy made before that time. Now, you have the same options as before, albeit that they behave a little differently. You can view the shadow copy, which displays, in a dialog, the shadow copy of the shared folder. You can navigate through the folder structure looking at what files (or folders) exist in that shadow copy. Alternatively, by choosing the Copy option you can make a copy of the entire share to another location. This can be useful if you want to let users pick through a data-set and see what files they want to restore.

Restoring Shared Folders

The third option, Restore, as the name suggests, allows you to restore the entire shared folder to the state at which the shadow copy was taken. As you can imagine, this option should be used with even more caution than the Restore option for a single file discussed earlier. Choosing to restore from this point reverts all existing files back to the state they were at the time when the shadow copy was taken. It will also restore any files that have been deleted, although it will not delete any newly created files. Even so, be very sure that this is what you want to do before you hit that Restore button!

So there you have it, another Windows Server 2003 tool that can save you time. As I mentioned earlier, you shouldn’t view Volume Shadow Copy as a replacement for your backups, more as a complement. After you start using it, though, you’ll wonder what you ever did without it.

Get the Free Newsletter!
Subscribe to Daily Tech Insider for top news, trends & analysis
This email address is invalid.
Get the Free Newsletter!
Subscribe to Daily Tech Insider for top news, trends & analysis
This email address is invalid.

Latest Articles

Follow Us On Social Media

Explore More