UiPath Documentation
automation-suite
2021.10
false
Automation Suite 安装指南
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

备份和还原集群

为了使用备份和还原功能,您需要启用 NFS 服务器、备份集群和还原集群。所有三个定义如下。

术语​

The NFS Server is the server that stores the backup data and facilitates the restoration. You can set up the NFS server on any machine or a PaaS service offered by cloud providers. Note that we do not support Windows-based NFS and Azure blob-based NFS.

备份集群是安装 Automation Suite 的位置。这是指您在安装过程中设置的集群。

还原集群是您要从备份集群中还原所有数据的集群。还原完成后,此集群将成为您运行 Automation Suite 的新集群。

以下步骤显示了如何设置所有三个步骤。

环境先决条件​

重要提示:
  • 此步骤不会为任何外部数据源备份 (SQL Server) 启用备份。您需要单独启用外部数据源备份。
  • 我们不支持跨区域备份和还原。
  • NFS 服务器应可从所有集群节点(备份集群和还原集群)访问。

  • 要备份的集群和 NFS 服务器必须位于同一区域。

  • Before the cluster restore, make sure to disable the backup as described in Disabling the cluster backup

  • 确保启用以下端口:

    端口协议来源目标用途要求
    2049, 111TCPNFS 服务器备份集群中的所有节点备份集群和 NFS 服务器之间的数据同步This communication should be allowed from the NFS Server to the backup cluster node before running Step 2: Enabling the cluster backup.
    2049, 111TCP备份集群中的所有节点NFS 服务器备份集群和 NFS 服务器之间的数据同步This communication should be allowed from the backup cluster node to the NFS Server before running Step 2: Enabling the cluster backup.
    2049, 111TCPNFS 服务器还原集群中的所有节点NFS 服务器和还原集群之间的数据同步This communication should be allowed from the NFS Server to restore the cluster node before running Step 3: Setting up the Restore Cluster.
    2049, 111TCP还原集群中的所有节点NFS 服务器备份集群和 NFS 服务器之间的数据同步This communication should be allowed from the NFS Server to the backup cluster node before running Step 3: Setting up the Restore Cluster.

步骤 1:设置外部 NFS 服务器​

要求​

NFS 服务器必须满足以下要求:

  • 您可以在所选的任何计算机和操作系统上设置 NFS 服务器,也可以使用云提供商提供的任何 PaaS 服务。请注意,我们不支持基于 Windows 的 NFS 和基于 Azure Blob 的 NFS。
  • Linux 上的 NFS 服务器版本必须是 NFSv4。
  • NFS 服务器必须在备份集群和还原集群外部运行。
  • NFS 服务器磁盘大小必须大于主服务器节点的数据磁盘大小。

See Hardware requirements for more details.

步骤 1.1:安装 NFS 库​

重要提示:

如果您已经拥有 NFS 服务器,请忽略步骤 1.1。

在计划用作 NFS 服务器的节点上安装 nfs-utils 库。

dnf install nfs-utils -y
systemctl start nfs-server.service
systemctl enable nfs-server.service
dnf install nfs-utils -y
systemctl start nfs-server.service
systemctl enable nfs-server.service

步骤 1.2:配置装载路径​

配置要从 NFS 服务器公开的装载路径。

chown -R nobody: "/datadisk"
chmod -R 777 "/datadisk"
systemctl restart nfs-utils.service
chown -R nobody: "/datadisk"
chmod -R 777 "/datadisk"
systemctl restart nfs-utils.service

步骤 1.3:禁用防火墙​

Firewalld 是一个管理网络和防火墙规则的安全库。

有关更多详细信息,请参阅 Firewalld 官方文档。

要禁用 Firewalld,请运行以下命令。

systemctl stop firewalld
systemctl disable firewalld
systemctl stop firewalld
systemctl disable firewalld

步骤 1.4:允许访问所有备份和还原节点的 NFS 装载路径​

All nodes must be able to access the NFS mount path. On the NFS Server, go to the /etc/exports file, and add an entry for the FQDN for each node (both server and agent) for both the Backup Cluster and the Restore Cluster.

以下是如何添加条目的示例,其中以下条目指定计算机的 FQDN 以及该计算机上的相应权限:

echo "/datadisk sfdev1868610-d053997f-node.eastus.cloudapp.azure.com(rw,sync,no_all_squash,root_squash)" >> /etc/exports
echo "/datadisk sfdev1868610-d053997f-node.eastus.cloudapp.azure.com(rw,sync,no_all_squash,root_squash)" >> /etc/exports

然后运行以下命令以导出安装路径:

exportfs -arv
exportfs -s
exportfs -arv
exportfs -s

步骤 2:启用集群备份​

重要提示:
  • Make sure you have followed the Environment prerequisites step.
  • 请务必备份用于安装的 cluster_config.json 文件。
  • 此步骤不会为任何外部数据源备份(例如 SQL Server)启用备份。您需要单独启用外部数据源备份。
  • 不建议将备份间隔缩短至 15 分钟以下。
  • Automation Suite 不会备份所有永久性卷,例如附加到 AI Center 中训练管道的卷。 仅为少数持久性卷创建备份,例如Alert Manager 、 Prometheus 、 Docker Registry 、 MongoDB 、 RabbitMQ 、 Ceph Objectstore和Insights 。

创建一个文件并将其命名为 backup.json。请务必根据以下字段定义填写该字段。

Backup.json​

{
  "backup": {
    "etcdBackupPath": "PLACEHOLDER",
    "nfs": {
      "endpoint": "PLACEHOLDER",
      "mountpath": "PLACEHOLDER"
    }
  },
  "backup_interval": "15"
}
{
  "backup": {
    "etcdBackupPath": "PLACEHOLDER",
    "nfs": {
      "endpoint": "PLACEHOLDER",
      "mountpath": "PLACEHOLDER"
    }
  },
  "backup_interval": "15"
}
  • backup.etcdBackupPath — 将在 NFS 服务器上存储备份数据的相对路径
  • backup.nfs.endpoint — NFS 服务器的端点(IP 地址或 DNS 名称)
  • backup.nfs.mountpath — NFS 服务器(端点)上的路径
  • backup_interval — 备份时间间隔(以分钟为单位)。

在以下示例中,备份数据将存储在 NFS 服务器上的/datadisk/backup/cluster0下:

{
  "backup": {
    "etcdBackupPath": "cluster0",
    "nfs": {
      "endpoint": "20.224.01.66",
      "mountpath": "/datadisk"
    }
  }
}
{
  "backup": {
    "etcdBackupPath": "cluster0",
    "nfs": {
      "endpoint": "20.224.01.66",
      "mountpath": "/datadisk"
    }
  }
}

步骤 2.1:在集群的主节点上启用备份​

要在集群的主节点上启用备份,请运行以下命令:

./install-uipath.sh -i backup.json -o output.json -b --accept-license-agreement
./install-uipath.sh -i backup.json -o output.json -b --accept-license-agreement

步骤 2.2:在集群的辅助节点上启用备份​

要在集群的辅助节点上启用备份,请在代理节点上运行以下命令:

./install-uipath.sh -i backup.json -o output.json -b -j server --accept-license-agreement
./install-uipath.sh -i backup.json -o output.json -b -j server --accept-license-agreement

步骤 2.3:在集群的代理节点上启用备份​

要在集群的代理节点上启用备份,请运行以下命令:

./install-uipath.sh -i backup.json -o output.json -b -j agent --accept-license-agreement
./install-uipath.sh -i backup.json -o output.json -b -j agent --accept-license-agreement

步骤 3:设置还原集群​

重要提示:
  • Make sure the backup is disabled before restoring the cluster. See Disabling the cluster backup.
  • 确保包 wget、unzip 和 jq 在所有还原节点上可用。
  • Make sure you have followed the Environment prerequisites step.
  • 所有外部数据源都应相同 (SQL Server)。
  • 在集群还原之前重新启动 NFS 服务器。在 NFS 服务器节点上执行以下命令:systemctl restart nfs-server。

还原集群要求​

  • 还原集群应具有与备份集群相同的 fqdn。
  • 还原集群应具有与备份集群相同数量的 server 和 agent 节点。
  • 还原集群应具有与备份集群相同的 server 和 agent 节点资源,如下所示:
    • CPU 的硬件配置

    • 内存的硬件配置

    • 磁盘空间的硬件配置

    • 节点主机名

      安装类型 安装指导 要求

      在线单节点评估模式

      仅下载 sf-installer zip,并将 chmod -R 755 <sf_installer_folder> 提供给提取的文件夹。

      chmod -R 755 <sf_installer_folder> 提供给提取的文件夹。

      离线单节点评估模式

      仅下载 sf-installer zip 和 sf-infra-bundle.tar.gz。

      chmod -R 755 <sf_installer_folder> 提供给提取的文件夹。

      在线多节点 HA 就绪生产模式

      仅下载 sf-installer zip,并将 chmod -R 755 <sf_installer_folder> 提供给提取的文件夹。

      离线多节点 HA 就绪生产模式

      仅下载 sf-installer zip 和 sf-infra-bundle.tar.gz。

      chmod -R 755 <sf_installer_folder> 提供给提取的文件夹。

      创建一个文件并将其命名为 restore.json。请务必根据以下字段定义填写该字段。

Restore.json​

{
  "fixed_rke_address": "PLACEHOLDER",
  "gpu_support": false,
  "fqdn": "PLACEHOLDER",
  "rke_token": "PLACEHOLDER",
  "restore": {
    "etcdRestorePath": "PLACEHOLDER",
    "nfs": {
      "endpoint": "PLACEHOLDER",
      "mountpath": "PLACEHOLDER"
    }
  },
  "infra": {
    "docker_registry": {
      "username": "PLACEHOLDER",
      "password": "PLACEHOLDER"
    }
  }
}
{
  "fixed_rke_address": "PLACEHOLDER",
  "gpu_support": false,
  "fqdn": "PLACEHOLDER",
  "rke_token": "PLACEHOLDER",
  "restore": {
    "etcdRestorePath": "PLACEHOLDER",
    "nfs": {
      "endpoint": "PLACEHOLDER",
      "mountpath": "PLACEHOLDER"
    }
  },
  "infra": {
    "docker_registry": {
      "username": "PLACEHOLDER",
      "password": "PLACEHOLDER"
    }
  }
}
  • fqdn — 用于多节点 HA 就绪生产模式的负载均衡器 FQDN 或用于单节点评估模式的计算机 FQDN
  • fixed_rke_address — 负载均衡器的 fqdn(如果已配置),否则为第一个还原服务器节点的 fqdn。用于对节点注册和 kube API 请求进行负载均衡。
  • gpu_support - 使用 true 或 false 为集群启用或禁用 GPU 支持(如果您有带 GPU 的代理节点,请使用)。
  • rke_token — 这是一个预共享的、特定于集群的密码。这应该与备份集群相同,可以在 cluster_config.json 文件中找到。加入集群的所有节点都需要它。
  • restore.etcdRestorePath — NFS 服务器中存储集群备份数据的路径。在备份时使用 etcdBackupPath 进行配置。
  • restore.nfs.endpoint — NFS 服务器的端点。
  • restore.nfs.mountpath:NFS 服务器的装载路径。
  • infra.docker_registry.username — 您在备份集群中设置的用户名。可以在 cluster_config.json 文件中找到它,并且是 Docker 注册表所必需的。
  • infra.docker_registry.password — 您在备份集群中设置的密码。可以在 cluster_config.json 文件中找到它,并且是 Docker 注册表安装所必需的。

在线安装​

Step 3.1: Restoring etcd on the primary node of the cluster​

要在集群的主节点上还原 etcd,请运行以下命令:

./install-uipath.sh -i restore.json -o output.json -r --accept-license-agreement --install-type online
./install-uipath.sh -i restore.json -o output.json -r --accept-license-agreement --install-type online
Step 3.2: Restoring etcd on secondary nodes of the cluster​

要在集群的辅助节点上还原 etcd,请运行以下命令:

./install-uipath.sh -i restore.json -o output.json -r -j server --accept-license-agreement --install-type online
./install-uipath.sh -i restore.json -o output.json -r -j server --accept-license-agreement --install-type online
重要提示:

所有辅助服务器节点都必须执行节点角色。

Step 3.3: Restoring etcd on agent nodes of the cluster​

要在集群的代理节点上还原 etcd,请运行以下命令:

./install-uipath.sh -i restore.json -o output.json -r -j agent --accept-license-agreement --install-type online
./install-uipath.sh -i restore.json -o output.json -r -j agent --accept-license-agreement --install-type online
步骤 3.4:禁用维护模式​
备注:

仅当还原是升级期间回滚操作的一部分时,才需要执行此步骤。

etcd还原完成后,请确保禁用维护模式:

/path/to/old-installer/configureUiPathAS.sh disable-maintenance-mode
/path/to/old-installer/configureUiPathAS.sh disable-maintenance-mode

要验证维护模式是否已禁用,请运行以下命令:

/path/to/old-installer/configureUiPathAS.sh is-maintenance-enabled
/path/to/old-installer/configureUiPathAS.sh is-maintenance-enabled
步骤 3.5:在主节点上运行卷还原​

etcd 还原完成后,请使用以下命令在主节点上运行卷还原:

./install-uipath.sh -i restore.json -o output.json -r --volume-restore --accept-license-agreement --install-type online
./install-uipath.sh -i restore.json -o output.json -r --volume-restore --accept-license-agreement --install-type online
步骤 3.6:在还原主节点上安装 Automation Suite 集群证书​
sudo ./configureUiPathAS.sh tls-cert get --outpath /opt/
cp /opt/ca.crt /etc/pki/ca-trust/source/anchors/
update-ca-trust
sudo ./configureUiPathAS.sh tls-cert get --outpath /opt/
cp /opt/ca.crt /etc/pki/ca-trust/source/anchors/
update-ca-trust
在还原的集群上启用 AI Center​

After restoring an Automation Suite cluster with AI Center™ enabled, follow the steps from the Enabling AI Center on the Restored Cluster procedure.

离线安装​

Step 3.1: Restoring etcd on the primary node of the cluster​

要在集群的主节点上还原 etcd,请运行以下命令:

./install-uipath.sh -i restore.json -o output.json -r --offline-bundle "/uipath/sf-infra-bundle.tar.gz" --offline-tmp-folder /uipath --install-offline-prereqs --accept-license-agreement --install-type offline
./install-uipath.sh -i restore.json -o output.json -r --offline-bundle "/uipath/sf-infra-bundle.tar.gz" --offline-tmp-folder /uipath --install-offline-prereqs --accept-license-agreement --install-type offline
Step 3.2: Restoring etcd on secondary nodes of the cluster​
./install-uipath.sh -i restore.json -o output.json -r -j server --offline-bundle "/uipath/sf-infra-bundle.tar.gz" --offline-tmp-folder /uipath --install-offline-prereqs --accept-license-agreement --install-type offline
./install-uipath.sh -i restore.json -o output.json -r -j server --offline-bundle "/uipath/sf-infra-bundle.tar.gz" --offline-tmp-folder /uipath --install-offline-prereqs --accept-license-agreement --install-type offline
Step 3.3: Restoring etcd on agent nodes of the cluster​

要在集群的代理节点上还原 etcd,请运行以下命令:

./install-uipath.sh -i restore.json -o output.json -r -j agent --offline-bundle "/uipath/sf-infra-bundle.tar.gz" --offline-tmp-folder /uipath --install-offline-prereqs --accept-license-agreement --install-type offline
./install-uipath.sh -i restore.json -o output.json -r -j agent --offline-bundle "/uipath/sf-infra-bundle.tar.gz" --offline-tmp-folder /uipath --install-offline-prereqs --accept-license-agreement --install-type offline
步骤 3.4:禁用维护模式​
备注:

仅当还原是升级期间回滚操作的一部分时,才需要执行此步骤。

etcd还原完成后,请确保禁用维护模式:

/path/to/old-installer/configureUiPathAS.sh disable-maintenance-mode
/path/to/old-installer/configureUiPathAS.sh disable-maintenance-mode

要验证维护模式是否已禁用,请运行以下命令:

/path/to/old-installer/configureUiPathAS.sh is-maintenance-enabled
/path/to/old-installer/configureUiPathAS.sh is-maintenance-enabled
步骤 3.5:在主节点上运行卷还原​

etcd 还原完成后,请使用以下命令在主节点上运行卷还原:

./install-uipath.sh -i restore.json -o ./output.json -r --volume-restore --accept-license-agreement --install-type offline
./install-uipath.sh -i restore.json -o ./output.json -r --volume-restore --accept-license-agreement --install-type offline
步骤 3.6:在还原主节点上安装 Automation Suite 集群证书​
sudo ./configureUiPathAS.sh tls-cert get --outpath /opt/
cp /opt/ca.crt /etc/pki/ca-trust/source/anchors/
update-ca-trust
sudo ./configureUiPathAS.sh tls-cert get --outpath /opt/
cp /opt/ca.crt /etc/pki/ca-trust/source/anchors/
update-ca-trust
在还原的集群上启用 AI Center​

After restoring an Automation Suite cluster with AI Center™ enabled, follow the steps from the Enabling AI Center on the Restored Cluster procedure.

禁用集群备份​

重要提示:

您可以使用 backup_interval 参数启用集群备份,以便在指定时间保存数据。禁用集群备份将导致在上次计划运行和禁用备份之间创建的数据丢失。

要禁用备份,请按此顺序运行以下命令:

  1. 在集群的主节点上禁用备份。

    ./install-uipath.sh -i backup.json -o output.json -b --disable-backup --accept-license-agreement
    ./install-uipath.sh -i backup.json -o output.json -b --disable-backup --accept-license-agreement
    
  2. 在集群的辅助节点上禁用备份。

    ./install-uipath.sh -i backup.json -o output.json -b -j server --disable-backup --accept-license-agreement
    ./install-uipath.sh -i backup.json -o output.json -b -j server --disable-backup --accept-license-agreement
    
  3. 在集群的代理节点上禁用备份。

    ./install-uipath.sh -i backup.json -o output.json -b -j agent --disable-backup --accept-license-agreement
    ./install-uipath.sh -i backup.json -o output.json -b -j agent --disable-backup --accept-license-agreement
    

Additional Configurations​

更新 NFS 服务器​

重要提示:

Make sure the backup is disabled before updating the NFS server. See Disabling the cluster backup for details.

要更新 NFS 服务器,请执行以下操作:

  1. 重新运行以下步骤:
    1. 步骤 1:设置外部 NFS 服务器
    2. 步骤 2:设置备份集群
    3. 步骤 3:设置还原集群
  2. 更新 NFS 服务器信息,然后在 backup.json 和 restore.json 文件中包括新的 nfs.endpoint。

向集群中添加新节点​

要将新节点添加到集群,请重新运行以下步骤:

  1. 步骤 1:设置外部 NFS 服务器
  2. 步骤 2:设置备份集群

已知问题​

Redis 还原​

运行还原时 Redis 还原失败,因此您需要运行一些其他步骤。

Follow the steps in the Troubleshooting section.

重要提示:

还原 Redis 后,请确保重新启动 orchestrator Pod。

还原后,Insights Looker Pod 无法启动。​

您可以通过在 ArgoCD 用户界面中从 Insights 应用程序中删除 Looker Pod 来解决此问题。部署将创建一个新的 Pod,它应该能够成功启动。

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新