StoreEasy Storage
1820649 Members
3348 Online
109626 Solutions
New Discussion юеВ

Re: How to automatically purge Shadow Copies

 
SOLVED
Go to solution
CA519660
New Member

How to automatically purge Shadow Copies

I have a NAS 2000S and setup VSS on the raid to take a copy every 12 hours. The scheduler does not have the option to keep only a specific number of old copies like the Persistant Storage Manager on the NAS B2000 system had. Is there a way to do this on the NAS 2000S?
2 REPLIES 2
CA1028844
Trusted Contributor
Solution

Re: How to automatically purge Shadow Copies

Unfortunately, that functionality does not exist in either the Web UI or in the native Shadow Copies tab.

Keep in mind that the snapshots will be purged as they approach the storage limits set by the administrator (the default being 10% of the LUN). So you will never consume more than whatever you set the maximum cap to.

Also keep in mind that the users will not see the number of Shadow Copies, or have to root through them. Rather, they will only be presented with the versions of the files that changed. So even if you have 50 snapshots out there, if a file only changed three times, then they will only have three versions to choose to restore from.

However, if this functionality is not sufficient, and/or if limiting the number of snapshots is really important to you, then you need to investigate the command-line VSS capabilities (Vssadmin.exe is the CLI tool).

You could, for example, create a script that creates a new Shadow Copy and deletes the oldest Shadow Copy. The commands you would need would be:

To Create:
Vssadmin Create Shadow /For=X:

To Delete:
Vssadmin Delete Shadows /For=X: /Oldest

You would also need to do some sophisticated scripting to check for errors on those commands, to not delete snapshots until you had amassed the maximum number you wanted (i.e. 8, or 12, or whatever), etc.

So as you can see, it can be done. But it will require some work on your part, because the functionality is not native to the VSS functionality or APIs.
CA519660
New Member

Re: How to automatically purge Shadow Copies

Kevin,
Thanks for the reply. I knew about the vssadmin but I did not know that the snapshots would purge as it reached the storage limits set by the admin. That will work for me...
Jeff L.