Shadow Copies of Shared Folders

Shadow Copies of Shared Folders provides point-in-time copies of files that are located on shared resources, such as a file server. With Shadow Copies of Shared Folders, users can view shared files and folders as they existed at points of time in the past. Accessing previous versions of files, or shadow copies, is useful because users can:

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

  • Recover from accidentally overwriting a file. If you accidentally overwrite a file, you can recover a previous version of the file. (The number of versions depends on how many snapshots you have created.)

  • Compare versions of a file while working. You can use previous versions when you want to check what has changed between versions of a file.

  • Best Practices for Shadow Copies of Shared Folders

  • Enable and Configure Shadow Copies of Shared Folders

  • Troubleshooting Shadow Copies of Shared Folders

Additional considerations

  • When you restore a file, the file permissions will not be changed. Permissions will remain the same as they were before the file was restored. When you recover a file that was accidentally deleted, the file permissions will be set to the default permissions for the directory.

  • Shadow Copies of Shared Folders is available in all editions of Windows Server 2008 R2. However, the user interface is not available for the Server Core installation option. To create shadow copies for computers with a Server Core installation, you need to manage this feature remotely from another computer.

  • When you bring disks online, if a disk contains shadow copy storage space for a volume, it is brought online before the volume itself to prevent the possibility of lost snapshots.

  • Creating shadow copies is not a replacement for creating regular backups.

  • When storage area limits are reached, the oldest shadow copy will be deleted to make room for more shadow copies to be created. After a shadow copy is deleted, it cannot be retrieved.

  • Storage location, space allocation, and the schedule can be adjusted to suit your needs. On the Local Disk Properties page, on the Shadow Copies tab, click Settings.

  • There is 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.

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

  • You can only enable Shadow Copies of Shared Folders on a per-volume basis—that is, you cannot select specific shared folders and files on a volume to be copied or not copied.

Additional references

For more information about Shadow Copies of Shared Folders and related backup and recovery features, see http://go.microsoft.com/fwlink/?LinkId=134698.


Best Practices for Shadow Copies of Shared Folders

We recommend that you consider the following best practices when you work with Shadow Copies of Shared Folders.

Use a separate volume on another disk as the storage area for shadow copies.

  • Select a storage area on a disk that is not being shadow copied. Using a separate volume on another disk eliminates the possibility that high I/O load will cause shadow copies to be deleted and provides better performance. This is the recommended configuration for heavily used file servers. For failover clusters, this configuration also requires that the original volume and storage volume belong to the same cluster resource group.

If you are using failover clusters, two volumes on the same disk cannot be associated for diff area storage.

  • This is because the cluster manages the disk for online and offline operations, but the Volume Shadow Copy Service (VSS) needs to have the diff area and original volumes brought offline or online in a specific order. Instead, the storage volume and the original volume need to be the same volume, or they need to be on separate physical disks.

Consider how your clients will use a shared resource before you enable Shadow Copies of Shared Folders and set scheduling options.

  • Adjust the shadow copy schedule to fit the work patterns of your clients.

Do not enable shadow copies on volumes that use mount points.

  • The mounted drive will not be included when shadow copies are created. Enable shadow copies only on volumes without mount points or when you do not want the shared resources on the mounted volume to be shadow copied. Alternatively, you can explicitly include the mounted volume in the schedule for shadow copy creation. (For previous versions of a file to be available, the volume must have a drive letter assigned.)

Perform regular backups of your file server.

  • Shadow Copies of Shared Folders is not a replacement for performing regular backups. Use a backup utility, such as Windows Server Backup in Windows Server 2008 or Windows Server 2008 R2, in coordination with Shadow Copies of Shared Folders as your strategy for data protection.

Do not schedule copies to occur more often than once per hour.

  • The default schedule for creating shadow copies is at 7:00 A.M., Monday through Friday. If you decide that you need copies to be created more often, verify that you have allotted enough storage space and that you do not create copies so often that server performance degrades. There is also an upper limit of 64 copies per volume that can be stored before the oldest copy is deleted. If shadow copies are created too often, this limit might be reached very quickly, and older copies could be lost at a rapid rate.

Before deleting a volume that is being shadow copied, delete the scheduled task for creating shadow copies.

  • If the volume is deleted without deleting the shadow copy task, the scheduled task will fail and an Event ID: 7001 error will be written to the event log. Delete the task before deleting the volume to avoid filling the event log with these errors. To manually delete the scheduled task, click Start, point to Administrative Tools, and then click Task Scheduler. In Task Scheduler, click Task Scheduler Library, right-click the task to create shadow copies, and then click Delete.

Use an allocation unit size of 16 kilobytes (KB) or larger when formatting a source volume on which Shadow Copies of Shared Folders will be enabled.

  • If you plan to defragment the source volume on which Shadow Copies of Shared Folders is enabled, we recommend that you set the cluster allocation unit size to be 16 KB or larger when you initially format the source volume. If you do not, the number of changes caused by defragmentation can cause previous versions of files to be deleted.

  • If you require NTFS file compression on the source volume, you cannot use an allocation unit size larger than 4 KB. In this case, when you defragment a volume that is very fragmented, you may lose older shadow copies faster than expected.

Additional references

  • Enable and Configure Shadow Copies of Shared Folders

  • Shadow Copies of Shared Folders

  • Troubleshooting Shadow Copies of Shared Folders


Enable and Configure Shadow Copies of Shared Folders

If you enable Shadow Copies of Shared Folders on a volume using the default values, a task will be scheduled to create shadow copies at 7:00 A.M.. The default storage area will be on the same volume, and its size will be 10 percent of the available space.

You can only enable Shadow Copies of Shared Folders on a per-volume basis—that is, you cannot select specific shared folders and files on a volume to be copied or not copied.

To enable and configure Shadow Copies of Shared Folders

  1. Click Start, point to Administrative Tools, and then click Computer Management.

  2. In the console tree, right-click Shared Folders, click All Tasks, and then click Configure Shadow Copies.

  3. In Select a volume, click the volume that you want to enable Shadow Copies of Shared Folders for, and then click Enable.

  4. You will see an alert that Windows will create a shadow copy now with the current settings and that the settings might not be appropriate for servers with high I/O loads. Click Yes if you want to continue or No if you want to select a different volume or settings.

  5. To make changes to the default schedule and storage area, click Settings.

Additional references

  • Best Practices for Shadow Copies of Shared Folders

  • Troubleshooting Shadow Copies of Shared Folders

  • Shadow Copies of Shared Folders


Troubleshooting Shadow Copies of Shared Folders

This topic provides solutions for some common issues that you may encounter for Shadow Copies of Shared Folders. For in-depth troubleshooting information for events and errors, see http://go.microsoft.com/fwlink/?LinkId=140210.

What problem are you having?

  • The event log is filled with the error Event ID: 7001.

  • Shadow copies are being deleted, but I still have plenty of storage space available.
The event log is filled with the error Event ID: 7001.
  • Cause: A volume that was scheduled to be shadow copied has been removed or is unavailable. Task Scheduler is attempting the task and every time the task fails, it writes an error to the event log.

  • Solution: Delete the scheduled task using Task Scheduler. If you are removing a volume that is being shadow copied, delete the scheduled task before deleting the volume so the event log does not fill with errors.

Shadow copies are being deleted, but I still have plenty of storage space available.
  • Cause: There is a limit of 64 shadow copies per volume that can be stored.

  • Solution: Adjust the schedule for creating shadow copies to a rate that retains an appropriate history of the files without reaching the limit of 64 shadow copies.

Additional references

  • Best Practices for Shadow Copies of Shared Folders

  • Shadow Copies of Shared Folders