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

还原备份

从快照备份中还原 Automation Suite 集群,并在还原完成后重新启用备份。

备注:

还原集群后,系统不会启用快照备份。要在还原后启用它,请参阅启用备份快照

还原集群不会还原外部数据源,例如 SQL Server、对象存储或符合 OCI 的注册表。请务必将这些数据源还原到相关快照。

要还原集群,请执行以下步骤:

  1. 在所有服务器节点上安装集群基础架构。详细信息…

    备注:

    您为还原集群提供的硬件必须与备份集群硬件类似。有关详细信息,请参阅硬件和软件要求

  2. 在还原的集群上配置快照。详细信息…

  3. 选择要还原的快照。详细信息…

  4. 还原数据和设置。详细信息…

步骤 1:安装集群基础架构

准备

  1. 下载还原安装程序。您可以在as-installer.zip包中找到它。有关下载说明,请参阅“下载安装包”

  2. 在离线环境中,您必须提供符合 OCI 的外部注册表或临时注册表。请注意,注册表配置必须与原始集群的配置保持相同。要配置注册表,请参阅以下说明:

  3. 准备配置文件并使其在所有集群节点上可用。要准备配置文件,请执行以下步骤之一:

    • 选项 A:重用您在灾难发生之前应用于集群的 cluster_config.json 文件;
    • 选项 B:创建包含所需参数的最小 cluster_config.json 文件,如以下示例所示:
      {
        "fixed_rke_address": "fqdn",
        "fqdn": "fqdn",
        "rke_token": "guid",
        "profile": "cluster_profile",
        "external_object_storage": { 
          "enabled": false 
        },
        "install_type": "offline or online",
        "snapshot": {
          "enabled": true,
          "nfs": {
            "server": "nfs_server_endpoint",
            "location": "nfs_server_mountpoint"
          }
        },
        "proxy": { "enabled": false }
      }
      {
        "fixed_rke_address": "fqdn",
        "fqdn": "fqdn",
        "rke_token": "guid",
        "profile": "cluster_profile",
        "external_object_storage": { 
          "enabled": false 
        },
        "install_type": "offline or online",
        "snapshot": {
          "enabled": true,
          "nfs": {
            "server": "nfs_server_endpoint",
            "location": "nfs_server_mountpoint"
          }
        },
        "proxy": { "enabled": false }
      }
      
      备注:

      此示例使用参数进行基于 NFS 的备份配置。如果您使用不同的备份配置,则必须将与 NFS 相关的部分替换为特定于备份配置的参数。

下表描述了必须包含在最小 cluster_config.json 文件中的所有参数。确保提供与原始集群中使用的参数值相同的参数值。您可以在还原后更改参数值。

重要提示:

在离线环境中,除了设置下表中列出的 cluster_config.json 参数外,还必须提供符合 OCI 的外部注册表配置。有关详细信息,请参阅符合外部 OCI 的注册表配置

参数

fqdn

Automation Suite 集群的 FQDN。 该值必须与旧的 FQDN 相同。 提供不同的 FQDN 值可能会导致还原失败。

fixed_rke_address

用于对节点注册和 kube API 请求进行负载均衡的固定地址。

如果已按照建议配置负载均衡器,则该值应与fqdn的值相同。否则,请使用第一个服务器节点的fqdn值。有关详细信息,请参阅配置负载均衡器

rke_token

在此处使用新生成的 GUID。这是一个预共享的、特定于集群的密码。加入集群的所有节点都需要它。

profile

设置安装的配置文件。可用的配置文件包括:

  • default – 单节点评估配置文件
  • ha – 多节点 HA 就绪生产配置文件

install_type

指示您计划执行的安装类型。您的选项包括:

  • online – 可以访问互联网的安装
  • offline – 无法访问互联网的安装

server

快照存储位置的 FQDN 或 IP 地址(例如mynfs.mycompany.com192.23.222.81 )。

location

快照存储位置的位置或路径。

infra.pod_log_path

用于 Pod 日志的自定义目录的路径。 如果集群配置了自定义 Pod 日志路径,则这是必需的。

proxy

仅当启用了代理时,此参数才为必需。有关详细信息,请参阅可选:配置代理服务器

有关如何配置cluster_config.json详细信息,请参阅手册:高级安装体验

执行

在主服务器节点上安装集群基础架构

要在主还原集群节点上安装基础架构,请运行以下命令:

cd <installer directory>
./bin/uipathctl rke2 install -i ../../cluster_config.json -o output.json --accept-license-agreement --restore
cd <installer directory>
./bin/uipathctl rke2 install -i ../../cluster_config.json -o output.json --accept-license-agreement --restore
重要提示:

cluster_config.json从主服务器节点复制到剩余服务器/代理节点。主服务器节点上的基础架构安装步骤会添加其余节点所需的额外值。

在辅助服务器上安装集群基础架构

要在辅助服务器上安装基础架构,请执行以下操作:

cd <installer directory>
./bin/uipathctl rke2 install -i ../../cluster_config.json -o output.json -j server --accept-license-agreement --restore
cd <installer directory>
./bin/uipathctl rke2 install -i ../../cluster_config.json -o output.json -j server --accept-license-agreement --restore
在所有代理计算机上安装基础架构

要在代理节点上安装基础架构,请执行以下操作:

cd <installer directory>
./bin/uipathctl rke2 install -i ../../cluster_config.json -o output.json -j agent --accept-license-agreement --restore
cd <installer directory>
./bin/uipathctl rke2 install -i ../../cluster_config.json -o output.json -j agent --accept-license-agreement --restore
结合使用集群内注册表以进行离线安装

仅当您使用集群内注册表进行离线安装时,才需要执行此步骤。 在触发还原之前,您必须使用以下命令结合使用注册表:

./bin/uipathctl rke2 registry hydrate-registry /opt/UiPathAutomationSuite/cluster_config.json
./bin/uipathctl rke2 registry hydrate-registry /opt/UiPathAutomationSuite/cluster_config.json
在服务节点上安装集群基础架构
在 Automation Suite Robot 节点上安装集群基础架构

要在 Automation Suite Robot 节点上安装集群基础架构,请执行以下操作:

cd <installer directory>
./bin/uipathctl rke2 install -i ../../cluster_config.json -o output.json -j asrobots --accept-license-agreement --restore
cd <installer directory>
./bin/uipathctl rke2 install -i ../../cluster_config.json -o output.json -j asrobots --accept-license-agreement --restore
在 GPU 节点上安装集群基础架构

要在 GPU 节点上安装集群基础架构,请执行以下操作:

cd <installer directory>
./bin/uipathctl rke2 install -i ../../cluster_config.json -o output.json -j gpu --accept-license-agreement --restore
cd <installer directory>
./bin/uipathctl rke2 install -i ../../cluster_config.json -o output.json -j gpu --accept-license-agreement --restore

步骤 2:准备集群以进行还原

安装基础架构后,您需要准备用于还原的集群快照。 根据您的场景,您必须运行以下命令:

  • 如果您使用外部对象:

    ./bin/uipathctl manifest apply /opt/UiPathAutomationSuite/cluster_config.json --only velero --versions versions/helm-charts.json
    ./bin/uipathctl manifest apply /opt/UiPathAutomationSuite/cluster_config.json --only velero --versions versions/helm-charts.json
    
  • 如果您使用集群内 ceph 对象存储:

    ./bin/uipathctl manifest apply /opt/UiPathAutomationSuite/cluster_config.json --only base,rook-ceph-operator,rook-ceph-object-store,velero --versions versions/helm-charts.json
    ./bin/uipathctl manifest apply /opt/UiPathAutomationSuite/cluster_config.json --only base,rook-ceph-operator,rook-ceph-object-store,velero --versions versions/helm-charts.json
    

要配置已还原集群的备份,请按照配置集群快照部分中的步骤操作。

步骤 3:选择要还原的快照

配置快照后,列出现有快照,并确定要用作还原点的快照。

步骤 4:还原数据和设置

要还原到以前的集群,请使用--from-snapshot <snapshot-name>标志提供要转换的快照名称。

./bin/uipathctl snapshot restore create <restore_name> --from-snapshot <snapshot_name>
./bin/uipathctl snapshot restore create <restore_name> --from-snapshot <snapshot_name>

该命令会触发还原过程。该流程首先还原备份,然后执行 Automation Suite 的相关任务。配置集群内 Ceph 存储后,它还会在同步应用程序之前还原 Ceph 数据。

如果还原过程失败,您可以使用新名称重新运行restore create命令。重试将从上次尝试期间失败的步骤继续还原过程。

要检查还原流程的状态,请运行以下命令:

./bin/uipathctl snapshot restore history
./bin/uipathctl snapshot restore history

此命令仅显示还原集群状态(Kubernetes 资源)的状态。

要监控 Automation Suite 执行的对象存储数据还原和还原后任务,请查看快照restore create命令的终端输出。

如果不指定快照名称,则集群将还原最新成功的快照。有关可用快照,请参阅快照列表

还原 cluster_config.json

恢复 Automation Suite 集群后,您可能需要恢复cluster_config.json文件以供将来使用,例如向集群添加新节点、升级等。

要恢复cluster_config.json ,请执行以下步骤:

  1. 您需要通过运行以下命令来查找上次应用的配置:

    ./bin/uipathctl manifest list-revisions
    ./bin/uipathctl manifest list-revisions
    

    以下示例是命令输出的示例:

    VERSION  UPDATED                        STATUS
    1        2024-11-07 00:46:41 +0000 UTC  successful
    2        2024-11-07 01:14:20 +0000 UTC  successful
    3        2024-11-07 01:23:23 +0000 UTC  successful
    VERSION  UPDATED                        STATUS
    1        2024-11-07 00:46:41 +0000 UTC  successful
    2        2024-11-07 01:14:20 +0000 UTC  successful
    3        2024-11-07 01:23:23 +0000 UTC  successful
    
  2. 选择在创建备份之前部署的正确版本号,并运行以下命令以检索cluster_config.json文件:

    ./bin/uipathctl manifest get-revision --version <VERSION>
    ./bin/uipathctl manifest get-revision --version <VERSION>
    

    以下示例是命令输出的示例:

    ./bin/uipathctl manifest get-revision --version 1 > ./cluster_config.json
    ./bin/uipathctl manifest get-revision --version 1 > ./cluster_config.json
    

将 CA 证书添加到信任存储区

还原集群后,请确保将 CA 证书添加到还原的虚拟机的信任存储区。有关详细信息,请参阅:

检索新的监控密码

备注:

本部分仅在您使用内置监控解决方案时适用。

还原 Automation Suite 集群后,您需要检索新的监控密码。为此,请按照访问监控工具中的步骤操作。

在还原的集群上启用 AI Center

还原启用了 AI Center™ 的 Automation Suite 集群后,请按照在还原的集群上启用 AI Center过程中的步骤操作。

正在生成新的 Kerberos 票证

如果设置了 Kerberos 身份验证,则必须确保 Kerberos 票证未过期。

要生成新的 Kerberos 票证,请运行以下命令:

kubectl get cronjobs -A | grep kerberos //to identify the job with name kerberos-tgt-update
kubectl create job --from=cronjob/<cron-job-name> <new_job_name> -n <namespace>
kubectl get cronjobs -A | grep kerberos //to identify the job with name kerberos-tgt-update
kubectl create job --from=cronjob/<cron-job-name> <new_job_name> -n <namespace>

确保分别将<cron-job-name><new_job_name><namespace>替换为 CRON 作业的实际名称、新作业的预期名称和实际命名空间。

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新