Share via


Restore Method

The Restore method starts a restore of the SharePoint Portal Server from the specified file-system location.

Sub Restore( _bstrPathAs String, _
  bstrPasswordAs String, _
  vfOriginalPathsAs Boolean _) [C++]
HRESULT Restore(
BSTRbstrPath,
    BSTRbstrPassword,
    VARIANT_BOOLvfOriginalPaths
);

[Visual Basic]

Parameters
  • bstrPath
    String that contains the local file-system folder where the backup information is stored. bstrPath can accept a local file system or universal naming convention (UNC) path.
  • bstrPassword
    String that contains the password. If a password was specified for the Backup method, that same password must be supplied to the Restore 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
  • bstrPath
    [in] BSTR that contains the local file-system folder where the backup information will be stored. bstrPath can accept a local file system or universal naming convention (UNC) path.
  • bstrPassword
    [in] BSTR that contains the password. If a password was specified for the Backup method, that same password must be supplied to the Restore 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 Restore 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.

Restore 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.