Hi Adventuresaurusgirl,
I found what I believe is the data you are looking for here.
Here is the link it came from.
http://msdn.microsoft.com/en-us/library/aa819132(VS.85).aspx
Excluding Files from Shadow Copies
In Windows Vista and Windows Server 2008, the developer of a VSS writer or application may choose to exclude certain files from shadow copies.
The performance impact and shadow copy storage area (also called "diff area") usage of a file in a shadow copy are directly related to the amount of change in the file's contents after the shadow copy is created. In addition, excluding files from shadow
copies may slow down shadow copy creation.
For these reasons, a file should be excluded from shadow copies only if it is large, undergoes significant change between one shadow copy and the next, and does not need to be backed up.
You should only exclude files that belong to your application.
If the VSS_VOLSNAP_ATTR_NO_AUTORECOVERY flag is set in the shadow copy context, this means that auto-recovery is disabled, and no files can be excluded from the shadow copy. For more information, see the
_VSS_VOLUME_SNAPSHOT_ATTRIBUTES enumeration.
Using the AddExcludeFilesFromSnapshot Method
A VSS writer can exclude files from a shadow copy as follows:
- Call the
IVssCreateWriterMetadataEx::AddExcludeFilesFromSnapshot method to report the files to be excluded.
- In the writer's
CVssWriter::OnPostSnapshot method, delete the files from the shadow copy.
Using the FilesNotToSnapshot Registry Key
A VSS application can delete files from a shadow copy during shadow copy creation by using the following registry key:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\BackupRestore\FilesNotToSnapshot
This registry key has REG_MULTI_SZ values for each application whose files can be excluded. The files are specified by fully qualified paths, which can contain the * wildcard.
In all cases, the entry is ignored if there are no files that match the path string.
After a file is added to the appropriate registry key value, it is deleted from the shadow copy during creation by the shadow copy optimization writer on a best-effort basis.
If a fully qualified path cannot be specified, then a path can also be implied by using the $UserProfile$ or $AllVolumes$ variable. For example:
- $UserProfile$\Directory\Subdirectory\FileName.*
- $AllVolumes$\TemporaryFiles\*.*
To make the path recursive, append " /s" to the end. For example:
- $UserProfile$\Directory\Subdirectory\FileName.* /s
- $AllVolumes$\TemporaryFiles\*.* /s
The $UserProfile$ variable causes the path string to be applied to all user profiles on the computer. The user profiles are enumerated by examining the following registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\ProfileList
The $AllVolumes$ variable causes the path string to be applied to all shadow copies on the computer. For example, suppose the path is "$AllVolumes$\TemporaryFiles\*.* /s", and the computer has three volumes: C:, D:, and E:. If C: and E: contain the path
"\TemporaryFiles\", and volume D: contains only the path D:\Data\, the directory tree C:\TemporaryFiles\ is deleted from shadow copies of C:, and the directory tree E:\TemporaryFiles\ is deleted from shadow copies of E:.
Administrators can disable expansion of the $UserProfile$ variable by using the following registry key:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Vss\Settings
Under this registry key, specify DisableUserProfileExpansion for the value name, REG_DWORD for the value type, and a nonzero value for the value data.
Matt
Microsoft Answers Support Engineer
Visit our
Microsoft Answers Feedback Forum and let us know what you think.