RestoreFromStream Method

The RestoreFromStream method starts a restore of the SharePoint Portal Server from the stream.

Sub RestoreFromStream( _pStreamAs Object, _
  bstrPasswordAs String, _
  vfOriginalPathsAs Boolean _) [C++]
HRESULT RestoreFromStream(
IUnknown*pStream,
    BSTRbstrPassword,
    VARIANT_BOOLvfOriginalPaths
);

[Visual Basic]

Parameters
  • pStream
    Object containing the stream.
  • bstrPassword
    String that contains the password. If a password was specified for the BackupToStream method, that same password must be supplied to the RestoreFromStream method.
  • vfOriginalPaths
    Boolean that contains the flag that indicates the storage paths used. The backup image contains settings that indicate where information was stored in the backed-up server. If the restore operation uses the storage locations from the backup image, set the vfOriginalPaths parameter to VARIANT_TRUE. If the data is being restored onto a system with different storage locations, set vfOriginalPaths to VARIANT_FALSE. This action obtains the storage locations from the already-installed SharePoint Portal Server and overrides the locations stored in the backup image.
Return Values

None.

Error Values

If an error is raised, Err.Number is set to one of the values documented on the Error Messages page.

[C++]

Parameters
  • pStream
    [in] Pointer to the IUnknown interface that contains the stream.
  • bstrPassword
    [in] BSTR that contains the password. If a password was specified for the BackupToStream method, that same password must be supplied to the RestoreFromStream method.
  • vfOriginalPaths
    [in] VARIANT_BOOL that contains the flag that indicates the storage paths used. The backup image contains settings that indicate where information was stored in the backed-up server. If the restore operation uses the storage locations from the backup image, set the vfOriginalPaths parameter to VARIANT_TRUE. If the data is being restored onto a system with different storage locations, set vfOriginalPaths to VARIANT_FALSE. This action obtains the storage locations from the already-installed SharePoint Portal Server and overrides the locations stored in the backup image.
Return Values

For a list of error messages returned by SharePoint Portal Server, see Error Messages.

Remarks

The RestoreFromStream method overwrites all information in the schema, workspaces, content indexes, document store, and system configuration. There is no capability to restore a portion of the server.

RestoreFromStream returns control to the calling application after the restore operation has started. SharePoint Portal Server will be unavailable during the restore operation, which may take some time. To check the status of backup operations in progress, use the GetBackupStatus method.