Community Pick: Many members of our community have endorsed this article.
Editor's Choice: This article has been selected by our editors as an exceptional contribution.

Previous Versions - The Backup's Backup

Published:

Introduction

Files have many enemies.  Some of them include:

The Delete Key
The Save Button
The Ovewrite Confirmation
Mr Virus
Mrs Trojan
Hard Disk Corruption
Unknown

In fact, every waking day, a file's livelihood is put at risk with each click or keypress, and this is not something that's going to change anytime soon.

This is what backups are for - so that we can recover from general accidents such as deleting files, overwriting files or even files which disappear mysteriously "without anybody doing anything".  The question is - are the backups that you are doing good enough?

For all of those of you who grimaced at reading that last line, you clearly have no backup strategy, or if you do, it's not enforced.  Please think about doing some kind of regular backup.  NOTE: RAID IS NOT BACKUP!

The failings with Backups

Any good IT strategy will include some form of backup and in some cases, disaster recovery.  Some backups methods are better than other, but for the majority of backups, it's done once a day.  Sounds good enough right?  Picture this scenario:

Accountant creates a new spreadsheet from scratch
Accountant spends 4 hours updating spreadsheet with data, saving every 20 minutes like he should.
Accountant creates a new spreadsheet for a different customer.
Accountant saves new spreadsheet over the one he just created.

Yup - you've guessed it - the file he just overwrote is not part of the backup.

Recycle bin?  No chance.  This was probably a network drive anyway, and besides - recycled bin only works for deleted documents that get sent to the recycle bin rather than actually being deleted.

This is where "Previous Versions" would be helpful.

What is "Previous Versions"

"Previous Versions" is a superb technology which is not new - in fact, it's been available since Windows 2002 (Windows XP).  It's just not "on" by default.  Previous versions is based on a technology known as "Shadow Copies" - which is the foundation of all kinds of backup technologies today.

What Shadow Copies does is create a copy of changed files since the last shadow copy.  This is done transparently - i.e. the user doesn't even notice, and can also be done while the file is already open.

Previous Versions can be accessed through Windows Explorer, by right-clicking on the file in question, selecting the "Previous Versions" tab, and restoring a file from there.  If your file has been deleted, then you would right click the folder instead, and use the "Previous Versions" of the folder to get the file back.

In Windows 8, they have moved this functionality to the File History control panel for local drives - for network drives it's still on the right-click properties tab.

Here is an example of a "Previous Version" of a document I have just modified.  If I want to discard this modification, I would Restore this document.

Previous Version of a Document
In the next example, I am viewing the previous version of an entire folder.  I can restore any of these documents if for example, I had deleted them.

My Documents as at 6th December 2012, 15h00
Pretty neat huh?  This has just plugged a small gap in my Backup Strategy, which only backs up my file server every 4 hours (and trust me, this is a very aggressive strategy for most companies)

Previous Versions does come with a cost though - and that is space.  You are able to tell the operating system how much space you would like Previous Versions to use, and in some cases, can actually specify an alternate volume for it to use.  Previous Versions will also not make way for normal data - so if you have 20 Gigabytes worth of Previous Version data, and your disk becomes full, then Previous Versions will not get smaller to make room for normal files like the Recycle Bin would.  If your allocated Previous versions area becomes full, then Shadow Copy will expunge older copies to make room for new copies.

Shadow Copies/Previous Versions are also not directly accessible - you have to use the Previous Version interface to access the files.  These shadow copies are kept in "System Volume Information", at the root of each volume.

Previous versions works both at the local drive level, as well as network drive level.  This document is here to show you how to configure it for your local drives - and also how to configure it for Windows Servers which may serve your network drives.  

Configuring Shadow Copy on Workstations

NOTE: With the exception of Windows XP, no additional configuration is necessary on the Workstation computers to get "Previous Documents" to work for network drives - only the servers have to be configured.  If you're looking to enable it for your Windows file servers, then skip to the section for Servers.

Please note that turning this feature on requires Administrator privileges on the various operating systems.  Your user has to be an Administrator of the computer, and if User Account Control is turned on (by default in Windows Vista and higher) you may be prompted to confirm the elevation.

Based on your Operating System of choice, turn on this feature as follows:

Windows 8

In Windows 8, this feature is known as "File History".  Open up your control panel - go to "System and Security" and then select "File History".  By default, it is turned off.  Simply click "Turn On" to turn it on, and you will see that it's creating its first shadow copy of your important locations.

File HistoryFile History turned onFile History Finished first Run
Once it has completed its first run, you can now use the "Restore Personal Files" window to recover files for which it has copies.  Shown below is the File History Browser for my Documents library.  To recover a file, right click a file to recover or recover to a new location.  You can also preview files from this window.

File History View
Using the "Advanced Settings", we can increase the frequency, size and duration of the saves copies.

File History Advanced Settings
Windows 7

Windows 7 users will be pleased to know that Previous Versions are a part of "Restore Points" which is automatically turned on on the drive upon which Windows was installed.  This is also by default the same drive as all of your documents.  Restore points are typically created once a day.  If you need to change these settings, open up your System settings, and select "System protection".  System settings can be obtained through the control panel, or right-clicking my computer and "properties"

System protection
Using the configure button on the System Protection tab, you can change the disk space used for system protection, you can turn off system protection completely, or you can also change the system protection to only allow protection of previous versions of files, giving you much more space for previous files.  You cannot unfortunately change the frequency of system protection, so if you make multiple changes to the file in one day, you can only revert to the previous days file.  You can however manually create a new restore point using the "Create" button.

Configure restore settingsRestore Settings
Windows Vista

As with Windows 7, Windows Vista comes with System Protection enabled by default.  Read the Windows 7 section to learn more about it, and to find out how to make changes.

Windows XP

Shadow Copy was only introduced in SP2 of Windows XP, and naturally is also included in SP3 of Windows XP.  By default, it is turned on, and to "configure" it, you right-click My Computer, and select "Properties" and go to the "System Restore Tab".  The only things you can change is to turn it on or off, and the disk space to use.

You should however be aware that system restore in Windows XP is very limited in its functionality, and does NOT support the "Previous Files" feature.  System Restore is only in there in the event that your computer no longer boots up, then you can boot into the F8 prompt, and roll back to a restore point.

System Restore in Windows XP
While "Previous Files" is not supported on the local drives, it is supported on network drives (Windows XP Professional only).  You will however notice that network drives/folders do not feature a "Previous Files" tab.  This is because you need to download and install the Shadow Copy Client from Microsoft before this tab becomes visible.  Once this component is installed you will see a Previous Versions tab.

Previous Versions tab in Windows XP
NOTE: If the Previous versions tab is still not visible, then it's most likely that your network drive has not got shadow copy configured.  If you believe that it does have, you can try to re-register the tab by running the following command from the Run prompt:

regsvr32 twext.dll

Open in new window

You should get the following success message if it has been done.

DllRegisterServer succeeded

Configuring Shadow Copy on Servers

Please note: Configuring this option requires you to be a local administrator on the target server.  It's perfectly valid if you're a nested member of the BUILTIN\Administrators group on the target server too (this would naturally include all Domain Admins).

Windows 2012

Use exactly the same steps as 2008/2008 R2 below.  To get to Computer Management, select "Tools -> Computer Management" from the Server Manager Dashboard instead of the instructions below.

Windows 2008/2008 R2

You can only enable Shadow Copy on entire volumes.  Hopefully, your user data you wish to enable this for is in its own volume, otherwise you may end up wasting some space for your shadow copies.

Open up Computer Management by clicking "Start -> Administrative Tools -> Computer Management", and then navigate to the Shared Folders Node.  Right click this, and select "All Tasks -> Configure Shadow Copies"

Configure Shadow Copies
Select the volume you wish to enable it on, and then click "Settings", to review the settings.  Here you can make changes, specifically, what's the maximum amount of space the volume shadow copies can occupy.

Settings
The default schedule is to do 2 copies a day - at 7 am and noon.  Consider changing this schedule to suit your needs.  Microsoft do not recommend that you create more than 1 shadow copy per hour.  The following screen-shot shows a modified schedule to do 1 copy every hour starting at 8 each day - for 9 hours.

Schedule
Once you are happy with the settings, click "Enable" to enable Shadow Copies for the volume.

Shadow Copies Enabled
The first Shadow Copy will always be a significant amount of space - but only a fraction of your actual data used.  Subsequent Shadow Copies will be even smaller, because it only creates copies of documents which have changed since the last synchronization.

Shadow Copies After First Run
NOTE: For Windows Core, you will have to use Computer Management from another server, and connect it to the server which hosts your data.

Windows 2003/2003 R2

Exactly the same steps as in 2008/2008 R2 above.

Windows 2000 Server

Shadow Copy was not part of Windows 2000 Server, but you could add it using a feature pack.  Regrettably, Windows 2000 ISO's are no longer available to download due to a java dispute and court ruling, so I am unable to provide detailed instructions on how to enable this.  I would suggest upgrading your Operating System if you would like this feature.

Further Reading

The following links will contain more useful information regarding this subject.
Shadow Copy (Wikipedia)
4
6,697 Views

Comments (1)

tigermattStaff Platform Engineer
CERTIFIED EXPERT
Most Valuable Expert 2011

Commented:
Great article, and a topic which many people (especially file server administrators) should learn more about and adopt as part of their backup strategy. The snapshotting system is incredibly robust despite being optimised to consume less space than an implementation using other backup systems, and the fact the recovery is self-service on the user's part just adds to the convenience of it.

Voted "yes" above!

-Matt

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.