IVssBackupComponents::SetPreviousBackupStamp method (vsbackup.h)
The SetPreviousBackupStamp method sets the backup stamp of an earlier backup operation, upon which a differential or incremental backup operation will be based.
The method can be called only during a backup operation.
Syntax
HRESULT SetPreviousBackupStamp(
[in] VSS_ID writerId,
[in] VSS_COMPONENT_TYPE ct,
[in] LPCWSTR wszLogicalPath,
[in] LPCWSTR wszComponentName,
[in] LPCWSTR wszPreviousBackupStamp
);
Parameters
[in] writerId
Writer identifier.
[in] ct
Type of the component. See VSS_COMPONENT_TYPE for the possible values.
[in] wszLogicalPath
Null-terminated wide character string containing the logical path of the component.
For more information, see Logical Pathing of Components.
The value of the string containing the logical path used here should be the same as was used when the component was added to the backup set using IVssBackupComponents::AddComponent.
The logical path can be NULL.
[in] wszComponentName
Null-terminated wide character string containing the name of the component.
The string cannot be NULL and should contain the same component name as was used when the component was added to the backup set using IVssBackupComponents::AddComponent.
[in] wszPreviousBackupStamp
The backup stamp to be set.
Return value
The following are the valid return codes for this method.
Value | Meaning |
---|---|
|
Successfully set the previous backup time stamp. |
|
One of the parameter values is not valid. |
|
The caller is out of memory or other system resources. |
|
The backup components object is not initialized, this method has been called during a restore operation, or this method has not been called within the correct sequence. |
|
The backup component does not exist. |
|
The XML document is not valid. Check the event log for details. For more information, see Event and Error Handling Under VSS. |
|
Unexpected error. The error code is logged in the error log file. For more information, see
Event and Error Handling Under VSS.
Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP: This value is not supported until Windows Server 2008 R2 and Windows 7. E_UNEXPECTED is used instead. |
Remarks
This method should be called before IVssBackupComponents::PrepareForBackup.
Only requesters can call this method.
The backup stamp set by SetPreviousBackupStamp applies to all files in the component and any nonselectable subcomponents it has.
Requesters merely store the backup stamps in the Backup Components Document. They cannot make direct use of the backup stamps, do not know their format, and do not know how to generate them.
Therefore, the value set with SetPreviousBackupStamp should either be retrieved from the stored Backup Components Document of an earlier backup operation (using IVssComponent::GetBackupStamp for the correct component), or from information stored by the requester into its own internal records.
A writer will then obtain this value (using IVssComponent::GetPreviousBackupStamp) and using it will be able to mark the appropriate files for participation in an incremental or differential backup.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | vsbackup.h (include VsBackup.h, Vss.h, VsWriter.h) |
Library | VssApi.lib |