VSS Backup State
During a backup operation, the requester uses IVssBackupComponents::SetBackupState to define the type of operation in progress.
This information is not included in an easily retrievable form in the Backup Components Document, so requester developers should store this information independently on any backup media.
The backup state contains the following:
-
Backup Type
-
The backup type specifies criteria for identifying files to be backed up. The evaluation of these criteria must be made using the VSS API.
When deciding on the type of backup to pursue and which writers to work with, requesters should examine the kinds (or schemas—see Writer Backup Schema Support) of backup operations that each of the system's writers supports. Backups under VSS can be the following types:
- Full (VSS_BT_FULL)—files will be backed up regardless of their last backup date. The backup history of each file will be updated, and this type of backup can be used as the basis of an incremental or differential backup. Restoring a full backup requires only a single backup image.
- Copy Backup (VSS_BT_COPY)—like the VSS_BT_FULL backup type, files will be backed up regardless of their last backup date. However, the backup history of each file will not be updated, and this sort of backup cannot be used as the basis of an incremental or differential backup.
- Incremental (VSS_BT_INCREMENTAL)—the VSS API is used to ensure that only files that have been changed or added since the last full or incremental backup are to be copied to a storage medium. Restoring an incremental backup requires the original backup image and all incremental backup images made since the initial backup.
- Differential (VSS_BT_DIFFERENTIAL)—the VSS API is used to ensure that only files that have been changed or added since the last full backup are to be copied to a storage media; all intermediate backup information is ignored. Restoring a differential backup requires the original backup image and the most recent differential backup image made since the last full backup.
- Log File (VSS_BT_LOG)—only a writer's log files (files added to a component with the IVssCreateWriterMetadata::AddDataBaseLogFiles method, and retrieved by a call to IVssWMComponent::GetDatabaseLogFile) will be backed up. This backup type is specific to VSS.
It is possible for requesters to implement these backups using information and methods outside of VSS. Only when a requester implements a backup using the VSS API should it be said to have one of the listed backup types. For instance, a requester participates in a VSS_BT_LOG type of backup only if it used the information returned by IVssWMComponent::GetDatabaseLogFile to identify log files. Similarly, the VSS_BT_INCREMENTAL and VSS_BT_DIFFERENTIAL types apply only to incremental or differential operations, as described in Incremental and Differential Backups.
-
Specification about Selectability
-
A VSS backup may choose to respect VSS notions of component selectability—this is referred to as running in component mode—or to ignore them.
An example of not running in component mode would be performing a system image backup, where the backup application would need writer cooperation to ensure data stability but where selection of components would be irrelevant.
-
Saving Bootable State
-
VSS supports saving the running system state in a fully bootable configuration. However, this is not always necessary, and writer preparation to save a bootable state can sometimes degrade real-time performance of a running system.
Therefore, requesters indicate whether a backup will include a bootable system state as an argument to IVssBackupComponents::SetBackupState. Writers determine whether they have to support saving the bootable system state by calling CVssWriter::IsBootableStateBackedUp.
Even if bootable system state is not selected, shadow copies of the system files will be made and the files may be backed up.
However, great care should be exercised in restoring system files if the backup did not save the bootable system state (see Backing Up and Restoring System State in Windows Server 2003 R2 and Windows Server 2003 SP1).
It is not possible to recover this information from a retrieved Backup Components Document, so requester authors should store whether the system was backed up with a bootable system state or not.
-
Partial File Support
-
Some writers support file restoration through the overwriting of parts of the files they manage. A requester may be designed to take advantage of this, and if so it indicates this by setting the information in IVssBackupComponents::SetBackupState.