Overview of Actual File Restoration

After performing the actions described in Overview of Restore Initialization and Overview of Preparing for Restore, the requester has sufficient information to begin restoring files. File restoration does not involve writer interactions or the generation of events. For more information, see Overview of Processing a Restore Under VSS.

The following table shows the sequence of actions and events that are required to restore files.

Requester actionEventWriter action
Generate a restore set listing for files on backup media.NoneNone
Handle directed targets or partial file restoration (see IVssComponent::GetDirectedTarget, IVssComponent::GetPartialFile).NoneNone
If necessary, ignore all specified restore locations and restore to a new location specified in an earlier call to IVssBackupComponents::AddNewTarget.NoneNone
If the restore is incremental and further restores are needed, indicate (see IVssBackupComponents::SetAdditionalRestores and Incremental and Differential Backups).NoneNone
To learn whether a writer has modified the contents of the Backup Components Document, call IVssBackupComponents::GetWriterComponents. For example, the writer might have changed the restore target.NoneNone

 

Requester Actions during Restoring Files

For most files on the backup media, the requester needs to determine their original locations and any new locations or alternate location mappings that apply to them. (See Generating a Restore Set for a discussion of best practices in determining which files to restore and where to restore them.)

In addition, some files may have directed targets or support partial file restoration. The number of such files can be found by calling IVssComponent::GetDirectedTargetCount and IVssComponent::GetPartialFileCount, and information on detailed restoration instructions can be found by calling IVssComponent::AddDirectedTarget and IVssComponent::GetPartialFile. (Partial and directed files can be part of components added implicitly or explicitly to the original backup, see Working with Selectability For Restore and Subcomponents for more information.)

Success or failure of a restore is indicated on a component-by-component basis using IVssBackupComponents::SetFileRestoreStatus. The need for further restore operations (in the case of incremental or differential restores) is also indicated on a component-by-component basis using IVssBackupComponents::SetAdditionalRestores.

In general, VSS does not specify a mechanism for retrieving data from a storage media, a choice of storage medium, or how to determine which files should be restored where.

However, for certain writers, restoring files may involve the use of a documented custom interface and procedure. Windows system writers, which currently require such support, are documented in Special VSS Usage Cases.

In general, it is recommended that the files of each component of each writer instance be processed as a unit. This requires the following:

  • Associating each file to be restored with the component that managed it. This requires the use of Writer Metadata Documents.
  • Obtaining correct restoration target information. This requires information from the Backup Components Document.

 

 

Show: