5

(I looked pretty hard and couldn't find an appropriate previous question, but I have to think this has been asked...somebody please point me at a duplicate?)

Is there any way to disable (or restrict to 0% disk space) the 'Previous Versions' functionality on files in Windows 7 without disabling System Restore or the Volume Shadow Copy service (this service in particular needs to be running for another particular application that requires it)?

Just hiding the UI elements is not sufficient; I don't want these backup copies being written to any files that aren't going to be restored in the System Restore process. (A list of what directories System Restore doesn't care about would be a nice start, but I'm guessing it's not that specific.)

Shinrai
  • 18,726
  • 3
  • 51
  • 72

2 Answers2

1

Show your actual VSS-Storage-limitations with vssadmin list shadowstorage.

Resize it with vssadmin resize shadowstorage /for=C: /on=C: /maxsize=10GB
For Maxsize you can use percentage (/maxsize=3%), unlimited (/maxsize=UNBOUNDED) or MB/GB (/maxsize=10GB).

Edit: you must at least specify 300MB for shadowstorage.

Update:
I think I found something that should work. According to this Blogpost you can stop the VSS-Service and configure it to start manually. That should prevent the System from doing Shadow-Copies. If you want to restore or create a System-Restore-Point, the service will be started automatically.

However Windows 7 creates System-Restore-Points periodically. If you don't want Windows to do this, you can modify the scheduled task like described on How-To Geek.

I hope that helps. Let me know if you've additional questions.

wullxz
  • 2,716
  • 4
  • 26
  • 38
  • This doesn't address the question at all. I'm talking about the actual creation of copies, not the restrictions on the VSS service itself. – Shinrai May 20 '11 at 01:51
  • I thought it's possible to set that to 0%. But it isn't ;) You could set it to 300MB in order to let the system create less copies... I didn't found a solution to disable VSS for the systemdrive yet. – wullxz May 20 '11 at 11:22
  • The problem isn't the space taken up by the copies, it's concerns about disk throttling and excess writes (which is probably actually made worse by reducing disk space because it has to more frequently erase the older files) – Shinrai May 20 '11 at 12:58
  • You could try to [exclude Directories from VSS](http://msdn.microsoft.com/en-us/library/aa819132%28v=vs.85%29.aspx) – wullxz May 20 '11 at 13:24
  • Is there a canonical list somewhere of which directories System Restore functionality needs access to? I'd guess pretty much the entire drive, so that's not a guaranteed workaround. (If you can find one you're my hero and I'll bounty this just to give you extra rep.) – Shinrai May 20 '11 at 14:51
  • edited my answer. maybe that helps you – wullxz May 20 '11 at 17:36
  • The VSS service on the machines I'm testing on is manual by default (this is how Windows installs OEM out of the box...) Again, what I'm really after is how to allow shadow copies of files that system restore is actually going to change while excluding all other files; the redundancy is unnecessary on a disk with proper backups. – Shinrai May 20 '11 at 18:13
  • I don't get it. You want system-restore? And you want an additional shadow-copy of the system-restore-files? Or do you want only the system-restore copy of a file? – wullxz May 20 '11 at 18:25
  • I think the question is pretty explicit. Windows "System Protection" by default, takes a previous version (with VSS) of every changed file on the machine when it makes a restore point, even though most of those changes (contents of the user's Documents folder, etc) don't actually get rolled back if you USE a system restore point. I want it to not make those extra shadow copies of things like the user's Documents folder and ONLY make copies of the files that the System Restore point needs. – Shinrai May 20 '11 at 18:28
  • Or, putting it another way: the Windows "System Protection" options are basically: Previous Versions + System Restore, Previous Versions only, neither. I want "System Restore only". – Shinrai May 20 '11 at 18:29
  • Ok, now I understand. Take a look at [this f.a.q.](http://windows.microsoft.com/en-US/windows-vista/System-Restore-frequently-asked-questions) from Microsoft and expand the point "What files are changed during a system restore?". System restore will not make shadow-copies of your own documents. They'll remain untouched. – wullxz May 20 '11 at 19:21
  • That's not true. Shadow copies of every document on the system are made when you create a system restore point - they're not RESTORED though. That's the whole problem...they're not getting restored, so I don't want it creating them! (I can very clearly see that they get created...I can access them through the properties dialogues on the files for crying out loud!) The problem isn't doing the system restore, the problem is creating the restore points. It's doing extra things and I want it to stop. – Shinrai May 20 '11 at 19:35
  • Right. I looked for previous versions in my Documents-Folder and can access them. But I don't think, that it's possible to stop system-restore doing shadow-copies of them. Maybe you can exclude your documents with my previous posted link "exclude Directories from Shadow-Copy". – wullxz May 20 '11 at 20:10
  • Unfortunately that breaks my other software that uses VSS from accessing them, so it's not an option. :/ I hope that you're not right that it's not possible to stop system restore from doing that...because THAT right there is the crux of my question. :) – Shinrai May 20 '11 at 21:26
  • Then tell us why VSS is breaking your software. Which software is it? What should it do? And what doesn't work? Maybe we can fix that. – wullxz May 20 '11 at 22:31
  • VSS doesn't break the software. The software USES VSS. It's a disk backup application that takes a VSS shadow of the drive and copies the contents. Setting those flags in the registry doesn't just keep System Restore from copying those files - it keeps ANYTHING from making shadow copies of them. – Shinrai May 20 '11 at 22:49
  • I don't understand your problem. Is your software crashing if VSS is enabled or does it work but you don't want to have too much shadow-copies? – wullxz May 20 '11 at 22:54
  • It works, but it does not copy directories that are excluded in the manner you linked. I want it to do that. I DON'T want System Restore to do that. – Shinrai May 20 '11 at 23:18
  • Is it a self-developed software? – wullxz May 20 '11 at 23:31
  • btw: I would help to tell us which software you are using and to describe us exactly WHY you don't want the system to shadow-copy your files when it creates a new system-restore-point. – wullxz May 20 '11 at 23:40
  • The application in question is Future Systems Solutions' Casper drive imaging software, but I've tried similar applications and they all have the same issue - it's the nature of how VSS works. And I've already described exactly why I don't want those copies - they're useless, they take up space, and they make unneeded writes to the disk (in this case, a solid state drive, so minimizing writes is a priority); I think we're having a bit of a language barrier and I'm sorry for that. Thank you for trying to help regardless of how difficult to understand I may be :) – Shinrai May 21 '11 at 00:00
  • If you do backups with third-party tools, you probably don't need system-restore-points or do you? If not, you could just disable the scheduled system-restore-point-task and let your backup-software take the shadow-copies and backup your files. I guess it's not possible to exclude files for system-restore and include those files in your backup-software. If it's not possible to disable the scheduled system-restore-task, I'll have to read more about VSS. – wullxz May 21 '11 at 01:03
  • You've hit the nail on the head. The problem is that the backup software runs daily (and only has a single instance of the backup) but System Restore is sometimes useful for more subtle problems that aren't noticed for several days...which is why we'd like to be able to leave it on. We do have a bit of a hack currently which is actually pretty interesting; when we're done I'll post it. – Shinrai May 21 '11 at 01:09
  • If you have normal disks in your computers, you could move shadow-copies to another disk/volume with `vssadmin resize shadowstorage /For=C: /On=D:` – wullxz May 21 '11 at 10:26
  • Right, but that's not an option here at the moment. :/ – Shinrai May 21 '11 at 13:54
1

There's really nothing you can do to fine tune what is included by Volume Shadow Copy (VSC)--it's going to make a shadow copy of the entire protected partition. At a higher level, though, you could probably help yourself (with respect to your concerns) by placing your data files (My Documents) or even all of your user files (including AppData, etc.) on a separate partition than your system files. Then the shadow copy on your system partition would include only system files, and you could decide whether to enable System Protection on your data partition (in order to have Restore Previous Versions available).

bethel95
  • 11
  • 1
  • Welcome to Super User, and thanks for the great suggestion. Unfortunately, in this particular situation we have no control over where the end users in these scenarios will be putting files, and no opportunity to educate them in the hows and whys. – Shinrai Jun 18 '11 at 14:23