Skip To Content

配置 ArcGIS Enterprise 灾难恢复

您可以将 ArcGIS Enterprise 部署复制到断开连接的备用部署。 在主部署失败的情况下,此备用部署可恢复为在线状态,并成为主动部署。

由于备用部署不会主动连接到主部署,因此可将备用部署设置在另一座建筑物或者其他城市中,以防止因当地发生自然灾害或断电而停机。 但请注意,必须确保可通过您的客户端访问此备用部署。

使用 webgisdr 工具将 ArcGIS Enterprise 主部署组件导出为压缩文件,并使用此压缩文件设置和维护备用部署。

在配置灾难恢复之前,请确保您已阅读灾难恢复和复制

导出 ArcGIS Enterprise

可使用 webgisdr 实用程序,通过导出操作和属性文件导出 ArcGIS Enterprise 主部署。 导出的文件包括您的门户、托管服务器、关系和切片缓存数据存储以及联合服务器。 文件大小和创建文件所需的时间可能有所不同,具体取决于您门户中的项目数量、您所拥有托管 Web 图层的数量和类型、您所拥有联合服务器的数量以及托管和联合服务器中 ArcGIS Server 计算机的数量。

您可在 Portal for ArcGIS 工具目录中找到 webgisdr 实用程序。 要使用此实用程序,必须满足下列条件:

  • 您指定的共享目录必须足以包含导出的文件。 执行一次 ArcGIS Enterprise 部署的测试导出以大概了解文件大小,确定共享目录中要保留的文件数量,然后相应估算目录的大小。
  • ArcGIS Enterprise 部署中 ArcGIS Data Store 的增量备份在 SHARED_LOCATION 备份目录的过渡文件夹中存储。 不应删除或修改过渡文件夹及其内容。
  • 用于运行 ArcGIS ServerPortal for ArcGISArcGIS Data Store 服务的域帐户或帐户必须拥有为备份文件指定的共享目录的写入权限。

注:

如果您的门户内容存储在文件系统中,则实时防病毒扫描会影响备份的性能。 请考虑从防病毒扫描程序中排除门户内容目录以及备份 SHARED_LOCATIONBACKUP_LOCATION 目录。

按照如下步骤导出主 ArcGIS Enterprise 部署:

  1. Open a text file and add the following information:

    • SHARED_FOLDER = <location for backup files>

      Designate a shared directory in which to create the backup file. The domain account that runs the ArcGIS for Server, Portal for ArcGIS, and ArcGIS Data Store must have write access to this directory. The account that installed ArcGIS for Server, Portal for ArcGIS, and ArcGIS Data Store must have read and write privileges on this directory. Be sure the directory is large enough to hold the backup file. Though the file is compressed, the file can be quite large depending on the amount and type of data you have. If you have hosted scene layers and caches and set INLCUDE_NOSQL_DATA to true, the file can be especially large.

    • PORTAL_ADMIN_URL = <portal admin directory URL>

      Specify the URL of the Portal for ArcGIS admin directory. Use the format https://portalhostname.domain.com:7443/arcgis.

    • PORTAL_ADMIN_USERNAME = <portal administrator user name>

      Specify the user name of a portal member assigned to the Esri-defined Administrator role.

    • PORTAL_ADMIN_PASSWORD = <portal administrator password>

      Specify the password of the portal administrator account.

    • PORTAL_ADMIN_PASSWORD_ENCRYPTED = <true | false>

      Set this option to true to encrypt the password value when you save the file. If you set this option to false, the password is saved in plain text.

    • INCLUDE_NOSQL_DATA = <true | false>

      If you publish hosted scene layers to your portal and want to include the scene cache data in the backup, set INCLUDE_NOSQL_DATA to true. Be aware that, if set to true, all scene cache data is included in the backup, not just the new cache data created since your last backup. If you know that no new scene caches have been created since your last backup or if you do not publish scenes to your portal, you can set INCLUDE_NOSQL_DATA to false.

    In this example, the portal at URL https://portalhostname.domain.com:7443/arcgis, plus its hosting and federated servers, and hosted feature layer data stored in an ArcGIS Data Store relational data store will be output to a backup file on \\mybuserver\\wgbackups. Scene layer caches from an ArcGIS Data Store tile cache data storewill not be included because INCLUDE_NOSQL_DATA is set to false.

    SHARED_FOLDER = \\\\mybuserver\\wgbackups
    PORTAL_ADMIN_URL = http://portalhostname.domain.com:7080/arcgis
    PORTAL_ADMIN_USERNAME = admin
    PORTAL_ADMIN_PASSWORD = Th3.Ad.Pass
    PORTAL_ADMIN_PASSWORD_ENCRYPTED = true
    INCLUDE_NOSQL_DATA = false

  2. Save the text file.

    The PORTAL_ADMIN_PASSWORD value is encrypted in the file if you set PORTAL_ADMIN_PASSWORD_ENCRYPTED = true.

  3. 打开命令窗口,将目录更改为 webgisdr 实用程序的位置,然后使用导出选项运行该实用程序。

    在本示例中,属性文件 (mywebgis.properties) 保存在用户创建的文件夹 C:\propfiles 中。

    webgisdr --export --file C:\propfiles\mywebgis.properties
  4. 您还可以添加另一个命令(例如验证脚本),使其在 webgisdr 工具完成后运行。 例如:

    > call webgisdr.bat -i -f webgisdr.properties
    > IF %ERRORLEVEL% EQU 0 <your validation script file>

完成备份后,将针对为 BACKUP_STORE_PROVIDER 设置的值创建文件。 如果将 BACKUP_STORE_PROVIDER 设置为 FileSystem,则备份将位于在属性文件中为 BACKUP_LOCATION 指定的位置。 如果将 BACKUP_STORE_PROVIDER 设置为 AmazonS3AzureBlob,它将被复制到各自的云存储位置。

文件的名称为 <timestamp>.webgissite

移动导出文件

如果导出文件是在备用部署无法访问的位置上创建的,请将备份文件移动到 webgisdr 工具能够访问的某一位置上。 创建专用于导入的属性文件的副本,并对新属性文件中的 BACKUP_LOCATION 值进行更新以反映导出文件的新位置。 如果 BACKUP_LOCATION 是目录,则该工具会将目录内的最新备份提取到 SHARED_LOCATION。 如果将 BACKUP_LOCATION 设置为特定备份文件,则该工具会将该备份提取到 SHARED_LOCATION

请确保备用部署中的计算机能够访问 SHARED_LOCATION 路径。

确保运行 webgisdr 工具的域帐户至少具有对 BACKUP_LOCATION 的读取权限以及对 SHARED_LOCATION 的写入权限。 确保运行 ArcGIS ServerPortal for ArcGISArcGIS Data Store 的域帐户具有对 SHARED_LOCATION 的读取权限。

为达到本工作流示例的目的,属性文件的副本命名为 toimport.properties

安装备用部署的组件

首次将 ArcGIS Enterprise 部署导入到备用部署之前,您需要在备用计算机上安装和配置所有软件组件(ArcGIS ServerPortal for ArcGISArcGIS Web AdaptorArcGIS Data Store)。 备用部署上用于访问门户(负载均衡器 URL 或 Web Adaptor URL)的 URL 和 ArcGIS Server 服务 URL 必须与主部署上的相同。

例如,如果在主部署上用于访问门户的 URL 为 https://myportalslb.organization.com/portal,而用于访问 GIS Server 的服务 URL 为 https://myserverslb.organization.com/server,那么备用部署必须使用与主部署相同的 URL。

备用部署无需其他 ArcGIS 许可,因为不会主动对其进行访问;只有主部署失败时才会将备用部署作为主动部署。

导入备用部署

在备用计算机上创建空部署后,即可将内容从主部署中导入。

如果 ArcGIS Enterprise 主部署具有高可用性,则当您导入至备用部署时,webgisdr 工具会保持 GIS Server 站点及 ArcGIS Data Store 关系和切片缓存数据存储的高可用性设置。 对于门户,webgisdr 工具注销备用门户计算机,将门户恢复到主计算机,并在导入时重新注册备用计算机。

  1. 在备用部署的 Portal for ArcGIS 计算机上打开命令窗口,将目录更改为 webgisdr 实用程序的位置,然后使用导入选项运行该实用程序。

    在本示例中,属性文件 (toimport.properties) 保存在用户创建的文件夹 C:\propfiles 中。

    webgisdr --import --file C:\propfiles\toimport.properties

    请注意,属性文件不必位于首次创建此文件时所保存的文件夹中。 如果此文件发生移动,请使用 --file 参数指定新的文件夹位置。

维护备用部署

为最大限度降低数据丢失,请尽可能频繁地从主部署中导出数据并将其导入备用部署。 维护频率取决于导出和导入部署所需的时间,以及您是否能够将导出和导入过程编写成脚本,而无需手动干预(例如,您可能需要将文件以物理方式从一个位置复制到另一个位置)。

主部署失败时切换到备用部署

正如灾难恢复和复制中所述,IT 部门可在主部署失败时将备用部署恢复为在线状态。