8

This has bothered me over the years and I'm dealing with it again now. I've never quite understood the full black magic that is Shadow Copies/VSS. I get it to the extent of what it does and how to initially set it up and set the schedules on the volumes. I also understand its role in backups.

Scenario

To simplify it, I'll stick with a single volume in my environment. I have the following schedules enabled:

1 - M-F 7am starting on 4/14/13
2 - M-F 12pm starting on 4/14/13
3 - 1st day of the month at 9am starting on 6/11/13

The Use limit for that volume's shadow copies is 25,599MB (25GB).

The volume is 250GB and has 44GB of free space.

Going backwards from today I show all the correct times/schedules for shadow copies back until 7/29/13. It doesn't go back further, and there isn't a 7/1/13 monthly copy.

I'm pretty sure I remember reading there is a 64 copy limit before the oldest gets overwritten. This makes sense since I count exactly 64 copies currently in the list.


My Questions

  1. Is there a way to change this 64 copy limitation?
  2. Can I prevent monthly copies from being overwritten somehow and let it overwrite just the "dailies" instead?
  3. Does MS or others provide a way to manage shadow copies in a more granular fashion than the basic scheduling on the volume, etc. that I've already done above? ie. the ability to tell it "keep only the previous 4 weeks of this schedule" or similar.

My goal is to get to a point where i can have 12 "monthlies" and the previous month twice "dailies" (for a total roughly of 72 copies it would seem).

I have "real backups" using Commvault Simpana but it's so much easier to deal with a restore from shadow copies for simple file shares.

TheCleaner
  • 32,352
  • 26
  • 126
  • 188

2 Answers2

6
  1. Yes you can change the limit up to 512 shadow copies per volume, by using the MaxShadowCopies registry key. You will probably also need to adjust the amount of storage space VSS is allowed to use with vssadmin.exe Resize ShadowStorage. (You may configure Shadow Copies for a volume to back up to a separate volume, such as one with more space. Again, vssadmin.exe is your friend here.)

  2. No.

  3. No.

VSS on its own works well, but it's pretty basic. Most good enterprise backup solutions make use of VSS on Windows machines. But to get those really granular and fine-tuned retention policies, you'll need to use a more thorough backup solution.

Ryan Ries
  • 55,011
  • 9
  • 138
  • 197
  • Thanks Ryan. I wasn't aware of the `MaxShadowCopies` key. This has allowed me to make sure the monthly copies are still there now. I haven't had to adjust the ShadowStorage yet. – TheCleaner Oct 07 '13 at 12:56
  • To add a little extra, 512 snapshots is not the best choice... I could figure out that Windows 7 is not capable to display more than 500 snapshots on the list :-) So when you reach the 512 snapshot, they're there, but the latest 12 don't display... erase the oldest 12 one and they reappear. Good maximum snapshot number would then be 500. –  Jun 20 '16 at 17:08
1

My goal is to get to a point where i can have 12 "monthlies" and the previous month twice "dailies" (for a total roughly of 72 copies it would seem).

As you already have noticed, the automatic VSS removal mechanism would always remove the oldest shadow copy/copies and does not allow you to configure a more sophisticated retention scheme. It also seems impossible to set a "no delete" mark on a particular shadow copy set.

To overcome this, you might disable (or at least increase) the space limit for shadow copies and purge them in a periodical script according to your needs by either invoking the diskshadow executable or employing the win32_shadowcopy WMI class. It would be most conveniently called before a new VSS copy is created through the task scheduler of your system.

the-wabbit
  • 40,319
  • 13
  • 105
  • 169