Restore-SPEnterpriseSearchServiceApplication
还原搜索应用程序的第三方备份。
语法
Restore-SPEnterpriseSearchServiceApplication
[-Name] <String>
-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>
-AdminSearchServiceInstance <SearchServiceInstancePipeBind>
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
-DatabaseName <String>
[-DatabasePassword <SecureString>]
-DatabaseServer <String>
[-DatabaseUsername <String>]
[-FailoverDatabaseServer <String>]
[-WhatIf]
[<CommonParameters>]
Restore-SPEnterpriseSearchServiceApplication
[-Name] <String>
-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
[-KeepId]
[-WhatIf]
-TopologyFile <String>
[-DeferUpgradeActions]
[<CommonParameters>]
说明
此 cmdlet 包含多个参数集。
只能使用一个参数集中的参数,而不能结合使用不同参数集中的参数。 若要详细了解如何使用参数集,请参阅 Cmdlet 参数集。
此 cmdlet 可供第三方用来创建使用现有数据的搜索应用程序。
有些第三方备份应用程序数据,且必须以后还原应用程序。 因此,数据会还原,并使用 Restore-SPEnterpriseSearchServiceApplication
cmdlet 创建使用还原数据的新搜索应用程序。
此 cmdlet 支持参数集。
第一组参数用于“应用程序配置附加”模式,第二组参数用于“搜索应用程序附加”模式。
应用程序配置附加模式仅还原存储在管理数据库中的配置数据。 但是,搜索应用程序附加会还原配置、拓扑和所有已爬网数据。
有关适用于 SharePoint 产品的 Windows PowerShell 的权限和最新信息,请参阅 SharePoint Server cmdlet。
示例
--------------------示例 1-----------------------
$searchInstance = Get-SPEnterpriseSearchServiceInstance -local
$applicationPool = New-SPServiceApplicationPool -Name "SearchServiceApplicationPool" -Account "domain\username"
Restore-SPEnterpriseSearchServiceApplication -Name "SearchServiceApplication" -ApplicationPool $applicationPool -AdminSearchServiceInstance $searchInstance -DatabaseName "SearchServiceApplication_Admindb" -DatabaseServer "SQLServer1"
此示例使用“应用程序配置附加”模式还原配置数据。
--------------------示例 2-----------------------
$applicationPool = New-SPServiceApplicationPool -Name "SearchServiceApplicationPool" -Account "domain\username"
Restore-SPEnterpriseSearchServiceApplication -Name "SearchServiceApplication" -ApplicationPool $applicationPool -TopologyFile "C:\TopologyFile.xml"
此示例使用“搜索应用程序附加”模式还原名为 topology.xml 的文件中的拓扑数据。
参数
-AdminSearchServiceInstance
指定要用于管理组件的 Search Service 实例。
Type: | SearchServiceInstancePipeBind |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-ApplicationPool
指定查询 Web 服务的应用程序池。
Type: | SPIisWebServiceApplicationPoolPipeBind |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-AssignmentCollection
管理对象以便正确进行处理。 使用 SPWeb 或 SPSite 等对象可能会耗用大量内存,而且在 Windows PowerShell 脚本中使用这些对象需要正确管理内存。 通过使用 SPAssignment 对象,可以将对象分配给变量,然后在不需要这些对象时对它们进行处理,以释放内存。 在使用 SPWeb、SPSite 或 SPSiteAdministration 对象时,如果不使用分配集合或 Global 参数,则会自动处理这些对象。
使用全局参数时,所有对象均包含在全局存储中。
如果未立即使用对象,或未通过使用 Stop-SPAssignment
命令来处理对象,则可能会发生内存不足的情况。
Type: | SPAssignmentCollection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Confirm
执行命令前,看到确认提示。
有关详细信息,请键入以下命令:get-help about_commonparameters
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-DatabaseName
指定要为还原搜索应用程序而创建的数据库的名称。
类型必须是SQL Server数据库的有效名称,例如 RestoreDB1。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-DatabasePassword
指定SQL Server上的数据库服务器的密码名称。
Type: | SecureString |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-DatabaseServer
指定在 DatabaseName 中指定的数据库的主机服务器名称。
类型必须是有效的SQL Server主机名,例如 SQLServerHost1。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-DatabaseUsername
指定在 Database Server 参数中指定的帐户名称。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-DeferUpgradeActions
在还原期间阻止数据库架构更新。 请勿使用。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2016, SharePoint Server 2019 |
-FailoverDatabaseServer
如果希望管理数据库使用故障转移数据库服务器,请使用此参数。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-KeepId
指定是否应将拓扑.xml文件中的搜索服务应用程序 ID 用于还原的搜索服务应用程序。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Name
指定新的搜索应用程序名称。
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-TopologyFile
指定包含应用程序拓扑信息的 .XML 文件的路径。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-WhatIf
显示一条描述命令作用的消息,而不执行命令。
有关详细信息,请键入以下命令:get-help about_commonparameters
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |