Saturday, September 20, 2008

Adjusting Vista's System Restore Disk Space

My 80 GB hard disk was getting low on free space...about 20% left. From a fragmentation perspective, you need +15% to run a defrag correctly. I needed to clear up some space...but how and from where?

So, in order to clear up some space, I:
  • cleared the Recycle Bin
  • scanned for junk files using the Disk Cleanup within Windows
  • scanned using WinDirStat (link)(screenshot) for any other large files that I might be able to get rid of
  • checked my pagefile.sys (virtual memory) to make sure Windows was locked into a specific size and/or not trying to create to large of a file. Note: I have 4GB of RAM, so the usage of a pagefile is probably not too extensive.
  • looked into System Restore settings to see how much disk space is being used

After realizing that System Restore on my Vista x86_64 lappy was using approx. 15% of my 80 GB hard disk, I decided this was an area I could investigate and make some adjustments.

Oh - wait. In Windows XP, the System Restore settings are somewhat trivial to find and adjust.

Right click on 'My Computer' and choose the 'System Restore' tab

On this tab, you can turn System Restore on or off and adjust the total size used. Depending on your application, adjusting these settings can be good...but potentially disastrous!

Make changes at your own risk!
Changes to System Restore and alter your PCs ability to provide to you the functionality of going back in time if something bad happens... Also, if you turn OFF System Restore, your old restore points go bu-bye. Now, I always turn off System Restore in my virtual machines and rely on snapshots to "go back".

Back to Vista...

I right click on "My Computer" and select 'Advanced system settings'. The applet windows that opens has a tab called 'System Protection'. I click on that tab and...wait. Where's my slider bar? Oh, there's a 'System Restore' button. Let's check that out. No...that just let's me select a restore point to go to or to create a new restore point.

Hmmm... Seems like some changes have taken place.

I poked around a bit on the InterTubes and discovered the System Restore policies are shadowstorage. An elevated command prompt and some commands are going to be required to adjust the System Restore settings.

I fired up a command prompt with Administrator privileges by typing "cmd" in the Run dialog.

I then
  • typed 'vssadmin list' to display the available options
  • typed 'vssadmin list shadowstorage' to see how much space was allocated and how much was in use.
  • I decided to cut 60% of this down - going from 14.1 GB to 5GB for System Restore. I am not using any particular calculation for this... More of a SWAG.

  • typed 'vssadmin resize shadowstorage' to get the syntax for the command
  • typed 'vssadmin resize shadowstorage /for=c: /on=c: /MaxSize=5GB' to trim down the System Restore size
  • The vssadmin command returns successful
  • ran the 'vssadmin list shadowstorage' command again to validate the setting

No comments: