在 SharePoint Server 中还原服务器场配置

适用于:yes-img-132013 yes-img-162016 yes-img-192019 yes-img-seSubscription Edition no-img-sopSharePoint in Microsoft 365

可以使用 SharePoint 管理中心网站或 Microsoft PowerShell 在 SharePoint Server 中还原场配置。 具体使用哪种备份工具,取决于已部署的环境类型、备份计划要求以及与组织达成的服务级别协议。

准备工作

只有在出现涉及配置数据库但未涉及到其他服务器场数据(例如内容数据库或 Web 应用程序)的故障之后,才会执行服务器场级别配置恢复。 If restoring the farm configuration does not solve the problems, you must restore the complete farm. For more information about how to restore the complete farm, see Restore farms in SharePoint Server. You can restore the configuration from a farm backup that used either the Backup content and configuration settings option or the Backup only configuration settings option.

注意

在早期版本的 SharePoint 中,无法还原配置数据库,因此无法还原场的配置。 现在无需还原配置数据库,因为可以直接还原场配置。

使用 PowerShell 还原 SharePoint 中的服务器场的配置

使用 PowerShell 还原服务器场的配置。

使用 PowerShell 还原场配置的具体步骤

  1. 确认您具有以下成员身份:
  • SQL Server 实例上的 securityadmin 固定服务器角色。

  • 要更新的所有数据库上的 db_owner 固定数据库角色。

  • 运行 PowerShell cmdlet 的服务器上的 Administrators 组。

    管理员可以使用 Add-SPShellAdmin cmdlet 授予使用 SharePoint Server cmdlet 的权限。

    注意

    [!注意] 如果您不具有这些权限,请联系您的安装管理员或 SQL Server 管理员来请求权限。 有关 PowerShell 权限的其他信息,请参阅 Add-SPShellAdmin

  1. 启动 SharePoint 命令行管理程序。

  2. 在 PowerShell 命令提示符处,键入以下命令:

    Restore-SPFarm -Directory <RestoreShare> -RestoreMethod Overwrite -ConfigurationOnly
    

    其中 <RestoreShare> 是存储备份文件的网络位置。 有关详细信息,请参阅 Restore-SPFarm

    注意

    [!注意] 我们建议您在执行命令行管理任务时使用 Windows PowerShell。 Stsadm 命令行工具已被弃用,仍然包含该工具是为了支持与之前产品版本的兼容性。

使用管理中心还原 SharePoint 中的服务器场的配置

您可以使用管理中心还原服务器场的配置。

使用管理中心还原场配置的具体步骤

  1. 确认执行此过程的用户帐户是运行管理中心的计算机上的 SharePoint 组"Farm Administrators"的成员。

  2. 验证:(可选)包括用户应执行的用于验证操作是否成功的步骤。

    您还必须是存储每个数据库的数据库服务器上 sysadmin 固定服务器角色的成员。

  3. In Central Administration, on the home page, in the Backup and Restore section, click Restore from a backup.

  4. 在"从备份还原 - 第 1 步(共 3 步): 选择要还原的备份"页上,从备份列表中选择包含服务器场备份的备份作业,然后单击"下一步"。

    注意

    通过展开包含备份的行,可以查看有关备份的其他信息。

    注意

    如果未显示正确的备份作业,请在"备份目录位置"文本框中输入正确备份文件夹的 UNC 路径,然后单击"刷新"。

  5. 在"从备份还原 - 第 2 步(共 3 步): 选择要还原的组件"页上,选中服务器场旁边的复选框,然后单击"下一步"。

  6. 在"从备份还原 - 第 3 步(共 3 步): 选择还原选项"页上的"还原组件"部分,确保"服务器场"显示在"还原以下内容"列表中。

    In the Restore Only Configuration Settings section, make sure that the Restore content and configuration settings option is selected.

    In the Restore Options section, select the Type of Restore option. Use the Same configuration setting. 将出现一个对话框,要求你确认操作。 单击“确定”。

    注意

    如果"仅还原配置设置"部分未显示,则所选的备份是仅配置备份。

    Click Start Restore.

  7. You can view the general status of all recovery jobs at the top of the Backup and Restore Status page in the Readiness section. You can view the status of the current recovery job in the lower part of the page in the Restore section. The status page updates every 30 seconds automatically. You can manually update the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the recovery to start.

    If you receive any errors, you can review them in the Failure Message column of the Backup and Restore Job Status page. You can also find more details in the Sprestore.log file at the UNC path that you specified in step 2.

另请参阅

概念

在 SharePoint Server 中备份服务器场配置