共用方式為


SPSiteCollection.Restore method (String, String, Boolean, Boolean)

還原指定的SPSite物件的集合,並指定是否要使用的主機標頭做為網站集合的名稱。

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Sub Restore ( _
    strSiteUrl As String, _
    strFilename As String, _
    bOverwrite As Boolean, _
    hostHeaderAsSiteName As Boolean _
)
'用途
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
)

參數

  • strSiteUrl
    Type: System.String

    字串,包含要還原之網站集合的 URL。

  • strFilename
    Type: System.String

    字串,包含備份檔案的名稱。

  • bOverwrite
    Type: System.Boolean

    true如果應該覆寫網站集合物件 ;否則,請false。

  • hostHeaderAsSiteName
    Type: System.Boolean

    true如果做為網站集合名稱 ; 必須使用主機標頭否則,請false。

請參閱

參照

SPSiteCollection class

SPSiteCollection members

Restore overload

Microsoft.SharePoint.Administration namespace