SPSiteCollection.Restore method (String, String, Boolean, Boolean)
Restores the specified SPSite object to the collection and specifies whether to use the host header as the name of the site collection.
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Sub Restore ( _
strSiteUrl As String, _
strFilename As String, _
bOverwrite As Boolean, _
hostHeaderAsSiteName As Boolean _
)
'Usage
Dim instance As SPSiteCollection
Dim strSiteUrl As String
Dim strFilename As String
Dim bOverwrite As Boolean
Dim hostHeaderAsSiteName As Boolean
instance.Restore(strSiteUrl, strFilename, _
bOverwrite, hostHeaderAsSiteName)
public void Restore(
string strSiteUrl,
string strFilename,
bool bOverwrite,
bool hostHeaderAsSiteName
)
Parameters
strSiteUrl
Type: System.StringA string that contains the URL to which to restore the site collection.
strFilename
Type: System.StringA string that contains the name of the backup file.
bOverwrite
Type: System.Booleantrue if the site collection object should be overwritten; otherwise, false.
hostHeaderAsSiteName
Type: System.Booleantrue if the host header should be used as the site collection name; otherwise, false.