Monday, August 30, 2010

VSS: Exclude Files and Folders from Shadow Copy

This very simple little hint can help greatly when dealing with older servers while limited drive space and demanding restore retention. This will only work on Vista upwards (Server 2008 for example)

Quite simply, open the registry key HKLM\System\CurrentControlSet\Control\BackupRestore\FilesNotToSnapshot – there will be a few default entries in there.
Add a new Multi-String Value and name it with a description for the set of files to exclude – for example My Custom Application. Now for the data, add a file or folder path to add to the exclusion list.

A folder can also include all sub-folders with the recursive switch /s, with the example below…

String Name Data
My Application %ProgramData%\MyApp\*
c:\MyApp\database.mdf
c:\MyApp\Sundry\* /s
My Application 2 %ProgramData%\MyApp2\scratch.bin

No comments:

Post a Comment