Windows

Recover data files in Windows 7 with Previous Versions

The Previous Versions feature of System Restore in Windows 7 can recover data in the event that a file is inadvertently deleted or becomes corrupted.

Many IT professionals know about, or have used, a restore point created by System Restore to restore a Windows system to a previous condition after some sort of a disaster. But did you know that in Windows 7 (and to some extent in Vista), the System Restore feature has been expanded in scope so that it now keeps track of, and saves, previous versions of data files that you've modified?

This means that in addition to allowing you to easily recover your system in the event of a disaster, System Restore's Previous Versions feature can help you to recover data in the event that a file is inadvertently deleted or becomes corrupted or even if you simply want to instantly undo a vast amount of editing changes.

While Previous Versions is a great Windows 7 feature, I've discovered that not many people know about it or use it. In this edition of the Windows Desktop Report, I'll take a look at the Previous Versions feature in Windows 7 and show you how it works.

Stay on top of the latest Microsoft Windows tips and tricks with TechRepublic's Windows Desktop newsletter, delivered every Monday and Thursday.

Some background

While I am hyping Previous Versions as a new feature, that's not entirely true. It actually has roots that go back to Windows XP and Windows Server 2003 when it was known as the Volume Shadow Copy Service. When you installed the Shadow Copies of Shared Folders client on a Windows XP system that was connected to a Windows Server 2003 server, the Previous Versions feature would be available in Windows XP. What's actually new in Windows 7 is that the entire feature is contained in the new operating system -- no server connection required.

I also said that the Previous Versions feature was to some extent available in Vista. More precisely, in Vista, the Previous Versions feature was available only in the Business, Enterprise, and Ultimate editions -- the Home Basic, Home Premium, and Starter editions did not include the feature. In Windows 7, the Previous Versions feature is available in all editions of the operating system.

How it works

As you know, to accomplish its feat, System Restore continuously monitors your system looking for significant changes to the operating system, such as when you install a new application, install new hardware and drivers, or receive a system or security update from Windows Update. When such an event occurs, System Restore will automatically create a Restore Point, which is essentially a snapshot of your system state, which comprises crucial system files, including certain parts of the registry. At the same time, Windows 7's System Restore will create snapshots of all the data files on the hard disk.

Now, even though System Restore automatically creates a Restore Point under the conditions mentioned above, that's not the only time. By default, Windows 7 will automatically create a restore point once a day. And, you can manually create restore points at any time.

In addition, if you also create backups using Windows 7's Backup and Restore tool, the Previous Versions feature will keep track of those backups and allow you to restore individual files from the Backup as well as the Restore Point.

For example, to access Previous Versions feature, just right-click on a file and locate the Restore Previous Versions command on the context menu, as shown in Figure A.

Figure A

You'll find the Restore previous version command on a file's context menu in Windows 7.
When you select the command, you'll see the Previous Versions tab of the file's Properties dialog box, as shown in Figure B. As you can see, this particular file is protected by both a Restore Point and Backup. Therefore, if I needed to recover an earlier version of this file, I could choose either copy depending on the date of the copy that I wanted.

Figure B

If you create backups using Windows 7's Backup and Restore tool, you can restore individual files from either the Backup or the Restore Point.

As you can see, there are three buttons on the Previous Versions tab: Open, Copy, and Restore. If you want to make sure that this is the version of the file that you want, you can select it and click the Open button; in this case Word would open the document so that you can check it out.

If you select the Copy button, you will see a standard Copy Items dialog box (like the Copy To command) and can restore the file to another folder. (Keep in mind that the Open and Copy commands will work only on files that are saved in a Restore Point snapshot -- you won't be able to use them if the version is available in a Backup.) If you select the Restore button, the file will be restored in the same condition as it was when it was saved by the Restore Point or the Backup.

Other considerations

It is important to keep in mind that the Previous Versions feature will show only Restore Point versions of a file if it has been altered since the last Restore Point was created. In other words, the Previous Versions tab will display the message like the one shown in Figure C if the file that has not been changed since the last Restore Point was created.

Figure C

If a file has not been altered since the last restore point, you'll see a message like the one shown here.

However, that doesn't mean there isn't a previous version stored in the Restore Point. In fact, if you open and save the file, you will see the Restore Point version in the Previous Versions tab.

Furthermore, if you have not altered a file for several months, new versions will not be saved each time a Restore Point is created.

Restoring a file

Now that you have a good understanding of what the Previous Versions feature is all about, let's take a look at how it works. For example, let's suppose that, inadvertently, I permanently delete my Word document, as shown in Figure D, and then later realize my mistake. In this case, since the file is gone, there is nothing to right-click on, so I must access the Previous Versions tab of the folder in which the file used to reside, as shown in Figure E.

Figure D

I accidentally deleted my Word document.

Figure E

To restore a permanently deleted file, I begin by accessing the Previous Versions tab of the folder in which the file used to reside.
If I want to make sure that this folder contains the file that I am looking for, I click the Open button. When I do, I see a folder that contains the copy of the file. At that point, I can actually open the file in Word to check its contents. Once I am sure that this is the file that I want to restore, I can close the file and the folder to return to the Previous Versions tab. At this point, I'll select the Restore button and will see a confirmation dialog box like the one in Figure F. If I click the Restore button, the file will be put back into its original folder.

Figure F

Before you can restore a file, you'll be prompted to confirm the operation.

Now, even though the message in this dialog box makes it sound like the entire folder will be replaced, that's not really the case -- only the deleted file will be restored. For instance, I had several other files in the folder before the Restore operation and they remained intact after the Restore operation.

What's your take?

Were you aware of the Previous Versions feature in Windows 7? If not, will you use it after reading this article? If you have used it, what has been your experience? As always, if you have comments or information to share about this topic, please take a moment to drop by the TechRepublic Community Forums and let us hear from you.

Also read:

About

Greg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry.

16 comments
Ocie3
Ocie3

informed me that the System Restore feature [i]"will not work"[/i] unless the Shadow Volume Copy (SVC) service is running. At the least, it must be running while each Restore Point is created, and at the time that any Restore Point is accessed or restored. They advise that a Restore Point that is created while SVC is disabled, for example, prior to updating a driver, may not be valid with regard to restoring the previous system state perchance the system doesn't work with the driver. Since Windows does not have a feature which enables the SVC service only while a Restore Point is being created or is being restored, only the user can effect that. Accordingly, Restore Points which are made automagically by Windows may not be valid unless the SVC service is always running by default. The accumulation of Restore Points that are expanded by SVC copies of files considerably increases the amount of storage space that Restore Points occupy on the drive, to say the least. You might not think that this is a concern, but you would probably be better off with a RAID 1 setup with two drives, in which one drive is a mirror of the other. What I do not understand is why the SVC service makes a copy of each and every DELETED file before it is deleted!! When I delete a file, I want the file to be deleted, and that is why I confirm the deletion! (Then I must eventually delete it from the Recycle Bin, of course.) If I wanted to make a copy of the file, then I would have instructed Windows to do that. Of course, copies of a deleted file as its content existed at the time of any other type of "backup" in which it was included still exist. Sometimes they are also restored to the drive from a backup copy regardless of whether that was intended. Any good backup and restore utility program has a feature(s) that allows that to be controlled by the user, however.

yawafrifa2000
yawafrifa2000

Thanks. I have seen the Restore Previous Version in the context menus and wondered what it meant. I never bothered to find out, but after reading this article I think I'm going to start trying it. Thanks for the info.

hippiekarl
hippiekarl

It certainly may come in handy one day. Thanks.

zdnet
zdnet

Hi from Paris, France ; so i apologize for my english ... It appears that effectively not all files are available from W7 Recover, and that it may be deceived with system crashes (what ? it happens ???). So i always use a very old version of SECOND COPY for that goal ; not so difficult to set up, il allows to be scheduled for example every night, and it achieves the most important recommendation about data security : make SEVERAL copies (versions) of your data, and on ANOTHER drive (than the saved one). Even with 3 daily automatic saves, what about a mistake you made in a database or an accounting software 2 weeks ago ? I also remember IBM's tips from when the PC (or MAC) did'nt exist... Take some time and space to also keep 2 special global saves : one let's say every 2 MONTHS, and one YEARLY, delays depending on your productivity. Thanks for your great articles, mr Shultz !

theamcguy
theamcguy

OK it works for files deleted today, what about files deleted 2 weeks ago after numerous shutdowns and start ups?

steve6375
steve6375

The wording in Figure F is far from ideal as it does not tell you any details about the file you are about to overwrite. Why not just say: Replace fred.exe 11/09.2011 13:14 3.4MB with fred.exe 10/09/2011 12:11 3.3MB Yes - make a copy - Cancel Is it just me, or does anyone find the dialog when you go to paste a file on top of another file in Explorer also confusing? Again, why not say 'replace xxx with yyy' Yes - Make a new copy - Cancel The XP 'replace' dialog was much clearer in my view.

databaseben
databaseben

I have known about the "restore to previous version" feature. However, I have also discovered it to be unreliable. Most of the time, there are "no previous versions" available, although there are a good number of restore points to select.

Mark W. Kaelin
Mark W. Kaelin

I did not realize System Restore had this capability, did you? That helps explain why it takes so long to create a restore point. This tool can come in handy, don't you think?

Mr. Fix
Mr. Fix

... for throwing some light on my earlier question about why System Restore may fail. Incidentally, does anyone know how SVC handles "shift-delete", which I've always used to bypass the Recycle Bin?

Mr. Fix
Mr. Fix

A great concept but, in my professional experience, these Windows restore functions just aren't what they're cracked up to be. Much to my disappointment, they appear to have a very high failure rate - so much so that I have often simply turned them off. While I strongly suspect this problem may have something to do with some undocumented incompatibility with automatic defragmentation utilities, I haven't the time or interest to invest in the investigation. Hopefully, someone reading this will take up the challenge to finally figure this out. I simply caution my clients to regularly back up their data and to NEVER rely on these built-in features. PS: By "undocumented incompatibility with automatic defragmentation utilities," I should explain that I always configure them to use defragmentation methods that have been optimized for VSS whenever appropriate but that doesn't appear to help.

Greg Shultz
Greg Shultz

...the Other considerations section of the article: In summary: The Previous Versions tab will display that message if the file has not been changed since the last Restore Point was created. However, that doesn???t mean there isn???t a previous version stored in the Restore Point. In fact, if you open and save the file, you will see the Restore Point version in the Previous Versions tab.

stevethehawk
stevethehawk

Thanks for that information. I have never (knock on wood) had to use system restore in any serious way. Comments I have heard over the years is that it is often unreliable. I do use Windows Backup as a precaution and will try to use Previous Versions should the need arise. However, just to be safe I occasionally send a straight copy of all document and data folders to a portable hard drive to be stored off site. If the info is important I don't want to depend solely on system restore.

joncowden
joncowden

I guess I am the only one who has had complete success with Previous Versions and VSS restores. Especially for the cheap SMB clients who do not want to properly invest in backup solutions. Just make sure to allocate enough space to the VSS and you will be golden... I could get in on how to do that... But that is another blog.

joncowden
joncowden

Sometimes it takes a total disaster for hard-headed cheap-skates to learn that investing in proper IT systems is the way to go in the end... You can only do so much as a consultant. You are hired to discover and make recommendations. And if those recommendations are agreed upon, then you act on them. If not, you do not. This was back before there were free backup solutions, and super-cheap 500gb hard drives... But for the everyday Excel or word document... PDF or powerpoint, this has been SOLID.... FCS!!!! I wouldn't count on VSS for a MDB restore, lawl!

Mr. Fix
Mr. Fix

... but what a reality check for those clients that neglect to invest in backup security if they ever fail! - Or should we say WHEN they fail? One of my clients that ignored my repeated advice to invest in a backup system ended up with a virus after the Payroll Manager went on Facebook (will they ever learn). It totally wiped out the partition table of the hard drive containing their payroll database - their only copy! Of what use is System Restore or Previous Versions when faced with such a scenario? NONE! What's more, the Payroll Manager responsible for this had missed payroll - with the Thanksgiving holiday less than a week away! The recovery process took me 3 days, working around the clock, was 100% successful, and they made payroll before the holiday hit but it was a very expensive lesson learned and, yes, you'd better believe they also had me install a backup system.