Recipe 19.7. Retrieving a Shadow Copy of a Corrupted or Deleted File


Problem

You have inadvertently deleted or modified an important file, and you want to restore a copy of it from before the mistake was made. You know your administrator has enabled shadow copies (sometimes called previous version functionality).

Solution

Using a graphical user interface

To restore a previous version of a file:

  1. Open a window in Windows Explorer.

  2. Navigate to the location where the damaged file resides.

  3. Right-click on the file, and select Properties. (Alternatively, you can select the Previous Versions link in the left pane of the window if you have Folder Tasks enabled.)

  4. Click on the Previous Versions tab, as shown in Figure 19-3.

    Figure 19-3. The Previous Versions tab


  5. Select the appropriate version of the file, called a shadow copy, from the list of previous versions on the tab and either copy the previous version to a different location using the Copy button, or restore it to its location at the time the copy of the file was made by using the Restore button.

  6. Click OK. The file will be restored.

Discussion

A shadow copy is essentially a previous version of the file or folder at a specific point in time. Shadow copies are great when you accidentally delete or change a file and save over your old copy you can simply retrieve the previous version of it and continue as you were, without the hassle of restoring from tape or involving an administrator.

Windows XP is currently the only client operating system that supports shadow copies. 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 can also be pushed out through IntelliMirror, a part of Group Policy.

To reduce user confusion, when you access the Previous Versions link in the Explorer view of a particular share, you are only presented with a list of unique copies that 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 you can copy, drag and drop, and perform any other function on them as usual except overwriting or deleting them.

Viewing an executable file through the Previous Versions tab in Windows Explorer (i.e., selecting the file and clicking View) will launch the program.


The actual making of the shadow copies a process known as taking a snapshot is configurable only on a Windows Server 2003 machine and is not user controllable.

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.

See Also

Chapter 3 of LearningWindows Server 2003 (O'Reilly), and MS KB 881789, "The Previous Versions tab for a file or for a folder in a DFS share is not displayed in Windows Server 2003 and in Windows XP"



Windows XP Cookbook
Windows XP Cookbook (Cookbooks)
ISBN: 0596007256
EAN: 2147483647
Year: 2006
Pages: 408

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