Getty Images/iStockphoto


How to configure shadow copies on file servers

When you enable the shadow copies service on your shared folders, you give your end users the flexibility to restore deleted files or revert a file to an earlier version.

It's imperative to give users a fast and easy way to recover previous versions of documents or restore deleted files. Shadow copies are one way to speed along this process.

One of your primary responsibilities as a file server administrator is to protect user data. Two of the most common ways to preserve user files are fault-tolerant storage, such as RAID, and redundancy with backups. One other option to recover lost or modified data is to use shadow copies.

The shadow copy service built into Windows Server makes this requirement easier to manage for you and makes file recovery a self-service option for your more adept users if they accidentally delete or alter files and need to revert to an earlier version.

How are shadow copies helpful for enterprise users?

Shadow copies are easy to manage and versatile enough to let users restore their own files when an issue occurs.

Shadow copies protect user data in several ways, such as the following:

  • Reversing unintentional overwrites or unintended changes.
  • Recovering from accidental deletions.
  • Comparing document versions.
  • Returning to earlier versions of files.

You have to enable the shadow copy service on the file server, configure a schedule for copies and then recover files for users if necessary.

What are the prerequisites and system requirements for shadow copies?

Volume Shadow Copy is a service of Windows Server; you don't have to add it as a role or feature. To use shadow copies, you must enable this service.

All supported Windows clients can recover previous versions of files on servers configured for shadow copies.

How do I configure shadow copies on a Windows file server?

Shadow copies work on a per-volume, not on a per-share, basis. Shadow copy configuration on a file server is straightforward with just a few options.

To start, enable shadow copies on the volume, and then configure the options to manage capacity and scheduling.

Use the following steps to set up shadow copies on the Windows Server file server:

  1. Log on with administrator credentials.
  2. Right-click the Start menu, and select Computer Management.
  3. Under System Tools, right-click Shared Folders, and choose All Tasks > Configure Shadow Copies.

The shadow copy service is off by default. Select Enable to turn it on. This is the minimum configuration, but for better results, it's advised to adjust more advanced options.

The Settings button manages the storage location for copies, the amount of storage space dedicated to the copies and the schedule to produce the shadow copies. The areas to modify include the following:

  • Volume. The source volume that hosts the files.
  • Storage area. The destination storage volume that stores the file copies.
  • Details. Shows information on free storage capacity on the volume.
  • Set maximum size. Defines how much storage to use for shadow copies. This is unused space on the drive that other services or tools could consume. It might require some investigating to find the optimal settings for maximum storage space.

In the Schedule section, define how frequently you want the system to make shadow copies. The default schedule contains two settings:

  1. 7 a.m., Monday through Friday.
  2. 12 p.m., Monday through Friday.

This might look like a good schedule, but you should consider your business environment before moving on. When I set up shadow copies for my organization, I added a schedule for Saturdays and Sundays because some employees worked remotely and during nontraditional hours. You should see whether your company has a similar need and adjust accordingly.

You create, delete and modify schedules with the Schedule button.

Under the Settings button, select Schedule. You can create or delete existing schedules. Select the New button, and configure the settings to create a new schedule. Choose the time and system status events from the pull-down menu, set the start time and set repeat intervals.

Shadow copies protect shared folders on a server share via the Volume Shadow Copy service. You can manage this service from the Services console. From the Computer Management console, expand the Services and Applications node, and then select the Services console. Scroll down to Volume Shadow Copy to restart the service or configure its other options.

How to maintain shadow copies for optimal performance

Shadow copies do not require much attention from the administrator, particularly if your file server has plenty of storage capacity. One of the biggest concerns is copy schedule maintenance. If you make too many shadow copies, then the server's performance can suffer. If you make too few shadow copies, then users might not be able to revert to the desired previous version.

The configuration interface for shadow copies does not mention one limitation: The system only retains the most recent 64 copies of a file. How does that work in practice? If you produce one shadow copy per day, then users only see a version once over the span of 64 days. If you set up the system to create a shadow copy once per hour, then users only see back 64 hours -- or slightly more than 2.5 days. You need to find a balance. I suggest twice a day, seven days a week, for businesses with people who work nontraditional hours. If your business is strictly 9-5, Monday through Friday, then the default schedule should be sufficient.

How to recover files with shadow copies

The file server administrators can restore previous versions of a file on behalf of users, or the users can perform the data recovery themselves. Not all users have the same technical ability. I taught some of my more tech-savvy users how to restore previous versions of their files, but others required my assistance to handle the restoration.

Administrators or other support specialists with appropriate permissions can restore folders and files by right-clicking on the shared folder and selecting the Previous Versions tab. The dialog box displays the copied folders. You can browse through the folders to find the files you need.

An end user can restore previous versions of files the same way without having to open a help desk ticket or otherwise involve the IT department. Shadow copies are tied to permissions, so a user can only recover resources to which they have access.

How to test the functionality of shadow copies

Use the following steps to demonstrate the usefulness of shadows copies. In this proof-of-concept test, you don't need to configure a schedule because the management is done manually.

First, configure shadow copies, and create a file copy:

  1. Enable shadow copies on the file server.
  2. Create a folder named Projects, and share it. Set the Share permissions at Everyone Full Control.
  3. Create a file inside the Projects folder called ToDo.txt.
  4. Open the ToDo.txt file, and add the text "Task 1: Enable Shadow Copies." Save and close the file.
  5. Return to the Configure Shadow Copies interface in Computer Management.
  6. Select Create Now. A timestamp appears, which represents this copy.

You have now set up shadow copies and created a copy of the volume.

Next, delete and then restore a file:

  1. Return to the Projects folder, and delete the ToDo.txt file to simulate an accidental deletion by a user.
  2. Refresh the Projects folder, and check that the ToDo.txt file is gone.
  3. Right-click the Projects folder, select Properties and then select the Previous Versions tab. The Projects folder should be visible.
  4. With the Projects folder highlighted, select Open, which should show the ToDo.txt file. Shadow copies have a copy of the deleted file.
  5. Select the Projects folder, and click Restore twice.
  6. Browse to the Projects folder in File Explorer, and open the ToDo.txt file. You should see Task 1.

This exercise is helpful to demonstrate to users and help desk technicians how to recover earlier versions of files stored on the file server.

What are some best practices for shadow copies?

Shadow copies do not replace regular backups or the use of fault-tolerant storage devices. Think of shadow copies as a supplement to other protective measures. The advantage of shadow copies is they make it easy to do a quick recovery if a user accidentally overwrites or deletes a file.

Microsoft suggests several best practices for shadow copy management. These include the following:

  • Develop a schedule based on how users work.
  • Configure shadow copies to store copies on a dedicated volume on a separate disk.
  • Do not schedule copies more frequently than hourly.

Dig Deeper on IT operations and infrastructure management

Cloud Computing
Enterprise Desktop
Virtual Desktop