Bagikan melalui


How Shadow Copies for Shared Folders Work

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

How Shadow Copies for Shared Folders Works

In this section

  • Shadow Copies for Shared Folders Architecture

  • Source Volume

  • Storage Volume

  • Previous Versions Clients

  • File Permissions

  • Related Information

Shadow Copies for Shared Folders is a new file-storage technology in Microsoft Windows Server 2003. Shadow Copies for Shared Folders provides point-in-time copies of files that are located on shared network resources, such as a file server. With the Previous Versions client for Shadow Copies for Shared Folders, users can view shared files and folders as they existed at points of time in the past. Accessing previous versions of your files, or shadow copies, is useful because users can:

  • Recover files that were accidentally deleted. If users accidentally delete a file, they can open a previous version and copy it to a safe location.

  • Recover from accidentally overwriting a file. If users accidentally overwrite a file, they can recover a previous version of the file.

  • Compare different versions of a file while working. Users can use previous versions when they want to check what has changed between two versions of a file.

Shadow Copies for Shared Folders Architecture

There are three main components that make up Shadow Copies for Shared Folders: the source volume, the storage volume, and the Previous Versions Client.

Shadow Copies for Shared Folders Components

Component Description

Source volume

The volume that is being copied. This volume is located on a server running Windows Server 2003 and has Shadow Copies for Shared Folders enabled. This volume contains several folders that are shared on the network. This is typically a volume on a file server.

Storage volume

The volume where shadow copies are stored.

Previous Versions Client

The interface that is used to view shadow copies. The client is available for Windows Server 2003, Windows XP, and Windows 2000 operating systems. For more information, see “Previous Versions Clients.”

The following diagram shows the main components of Shadow Copies for Shared Folders and how they interact.

Shadow Copies for Shared Folders Architecture

Shadow Copies for Shared Folders Architecture

Source Volume

The source volume is the volume that is being copied, typically a volume on a file server. Shadow Copies for Shared Folders is enabled on a per-volume basis. That is, you can only make shadow copies of an entire volume. You cannot select specific shared folders and files on a volume to be copied.

The volume must reside on a server running Windows Server 2003 and must be formatted using the NTFS file system. Shadow Copies for Shared Folders is built upon the Volume Shadow Copy service technology, which provides a way to make copies of open files. For more information, see “Volume Shadow Copy Service Technical Reference.”

The mounted drive will not be included when shadow copies are taken. You should enable shadow copies only on volumes without mount points or only when you do not want the shared resources on the mounted volume to be copied.

You can access the server portion of Shadow Copies for Shared Folders through the Shadow Copies tab of the Local Disk Properties dialog box.

Note

  • When you enable Shadow Copies for Shared Folders on a volume, a default scheduled task is also created. The default schedule for copies is twice a day at 7:00 A.M. and 12:00 noon, Monday through Friday.

Storage Volume

The storage volume is where shadow copies are stored. Shadow copies can be stored on any NTFS-formatted volume that is available to the server, including mounted volumes. Because of the high I\O involved in creating the copies, we recommend that you store the shadow copies on a volume on a separate disk from the disk that contains the source volume.

If you use Shadow Copies for Shared Folders on mounted volumes in a cluster, do not place the storage volume on a volume that is mounted to the source volume. In addition, do not mount the source volume to the storage volume. Otherwise, the cluster dependency between the Physical Disk resources of the mount point volume and the volume it is mounted to will interfere with the cluster dependency that is introduced by VSS between the source and storage volumes.

Shadow Copies for Shared Folders works by making a block-level copy of any changes that have occurred to a file since the last shadow copy was created. The file changes are copied and stored as blocks, or units of data. Generally, the entire file is not copied. Only the previous values of the changed blocks are copied to the storage area. As a result, previous versions of files do not usually take up as much disk space as the current file.

However, the amount of disk space that is used for changes can vary, depending on the application that changed the file. For example, some applications rewrite the entire file when a change is made, but other applications add changes to the existing file. If the entire file is rewritten to disk when a change is made, then the shadow copy contains the entire file.

The minimum amount of storage space that you can specify to be used for storing shadow copies on the storage volume is approximately 100 megabytes (MB) for computers running Windows XP with Service Pack 2 or Windows Server 2003. It is approximately 300 MB for Windows Server 2003 with hotfix 833167 applied. The default storage size is 10% of the source volume (the volume being copied). When the storage limit is reached, older versions of the shadow copies will be deleted and cannot be restored. There is also a limit of 64 shadow copies per volume that can be stored. When this limit is reached, the oldest shadow copy will be deleted and cannot be retrieved.

Note

  • Shadow copies are read-only. You cannot edit the contents of a shadow copy.

Previous Versions Clients

There are two clients for Shadow Copies for Shared Folders:

  • Previous Versions Client for Windows XP and Windows Server 2003. This client can be installed on Windows XP from the Windows Server 2003 installation media or it can be installed using the .msi package that is available at the Microsoft Download Center. Previous Versions Client is installed by default on Windows Server 2003 and is included when you install Windows XP Service Pack 2.

  • Previous Versions Client for Windows 2000. This client is only available from the .msi package available at the Microsoft Download Center. In order for Windows 2000 clients to view shadow copies, a registry key must be set on the computer running Windows Server 2003 that enables access by Windows 2000 clients. The .msi package that contains the Windows 2000 client also contains an installation package for the server that will set this registry key.

You can access the client view of shadow copies through the Previous Versions tab of the Properties dialog box of the shared file or folder.

You cannot view previous versions of files on a local shared resource. You must have a working network connection and be viewing the volume as a shared network resource. On a computer running Windows Server 2003, in order to view shadow copies of a local shared folder, you must create a connection to the shared resource on your local computer as if it were in another location on the network. For example: To view previous versions of files in the shared folder \Documentson the local computer \\Server1, you need to create a network connection to \\Server1\Documents and access the previous versions as if they were on a remote computer.

File Permissions

When you restore a file to a previous version, the file permissions will not be changed. File permissions remain the same as they were before the file was restored. When you recover a file that was accidentally deleted, the file permissions are set to the default permissions for the directory the file is in. This directory might have different permissions than the file.

The following resources contain additional information that is relevant to this section.