Automation Suite
2023.10
False
横幅背景图像
Linux 版 Automation Suite 安装指南
上次更新日期 2024年4月19日

在对象存储之间迁移数据

如果要执行以下任何操作,则可能需要迁移对象存储数据:

  • 对对象存储中的数据进行一次性备份;
  • 将对象存储数据从一个 Automation Suite 集群迁移到另一个集群。

要求

在开始对象存储数据迁移之前,请确保满足以下要求:

  • 您已下载以下文件:

  • 您具有下载和上传到对象存储所需的临时存储空间。 临时存储的大小取决于对象存储中存储的数据的大小。 要确定所需的存储大小,请在任何服务器节点上运行以下命令:

    object_size=$(kubectl -n rook-ceph exec deploy/rook-ceph-tools -- ceph status --format json | jq -r '.pgmap.data_bytes')
    echo "You need '$(numfmt --to=iec-i $object_size)' storage space"object_size=$(kubectl -n rook-ceph exec deploy/rook-ceph-tools -- ceph status --format json | jq -r '.pgmap.data_bytes')
    echo "You need '$(numfmt --to=iec-i $object_size)' storage space"

准备离线安装

重要提示:

仅当 Automation Suite 设置处于离线状态时,本节中的说明才适用。

您可能必须在从中下载对象存储数据的计算机和上传对象存储数据的计算机上执行这些步骤。

在具有根访问权限的任何服务器节点上执行以下步骤。

  1. 在离线安装中登录到私有 Docker 注册表:
    dpr_username=$(grep 'username:' /etc/rancher/rke2/registries.yaml | awk -F 'username:' '{print $2}' | tr -d ' ')
    dpr_password=$(grep 'password:' /etc/rancher/rke2/registries.yaml | awk -F 'password:' '{print $2}' | tr -d ' ')
    
    podman login localhost:30071 --username ${dpr_username} --password ${dpr_password} --tls-verify=falsedpr_username=$(grep 'username:' /etc/rancher/rke2/registries.yaml | awk -F 'username:' '{print $2}' | tr -d ' ')
    dpr_password=$(grep 'password:' /etc/rancher/rke2/registries.yaml | awk -F 'password:' '{print $2}' | tr -d ' ')
    
    podman login localhost:30071 --username ${dpr_username} --password ${dpr_password} --tls-verify=false
  2. 将实用程序 tarball 推送到私有 Docker 注册表:
    1. 确保已将实用程序 tarball 复制到服务器节点,然后导航到其位置。
    2. 通过运行以下命令,提取映像并将其上传到私有 Docker 注册表:
      gzip -dk -c automation-suite-util.tar.gz > sf-k8-utils-rhel_0_7.tar
      podman load -i sf-k8-utils-rhel_0_7.tar
      podman push --tls-verify=false localhost:30071/sf-k8-utils-rhel:0.7gzip -dk -c automation-suite-util.tar.gz > sf-k8-utils-rhel_0_7.tar
      podman load -i sf-k8-utils-rhel_0_7.tar
      podman push --tls-verify=false localhost:30071/sf-k8-utils-rhel:0.7

从对象存储下载数据

注意:请确保服务器节点上有可用的存储空间来执行对象存储备份,然后再继续执行以下步骤。
  1. objectstore-migration.sh脚本复制到您已在其中确定可用于备份的存储的服务器节点。
  2. 导航到已复制迁移脚本的文件夹。
  3. 通过运行以下命令备份对象存储数据:
    注意:运行主脚本之前,请确保提供存储备份数据的绝对文件夹路径。使用 CEPH_BACKUP_PATH 变量指定路径。
    export CEPH_BACKUP_PATH=/ceph/backup/path # please replace /ceph/backup/path with the path where you want to take the backup
    export CEPH_OPERATION=backup 
    ./objectstore-migration.shexport CEPH_BACKUP_PATH=/ceph/backup/path # please replace /ceph/backup/path with the path where you want to take the backup
    export CEPH_OPERATION=backup 
    ./objectstore-migration.sh
  4. 如果备份成功,您应该会看到以下输出:
    job.batch/ceph-objectstore-ondemand-backup-job created
    job.batch/ceph-objectstore-ondemand-backup-job condition metjob.batch/ceph-objectstore-ondemand-backup-job created
    job.batch/ceph-objectstore-ondemand-backup-job condition met

将数据上传到对象存储

重要提示:如果您将数据上传到其他 Automation Suite 对象存储,请确保上一部分中备份的数据在任何服务器节点上可用。您可以将磁盘装载到新集群的服务器节点上,也可以通过您喜欢的任何其他方式传输数据。

要将数据上传到对象存储,请执行以下步骤:

  1. objectstore-migration.sh脚本复制到您已在其中确定可用于备份的存储的服务器节点。
  2. 导航到已复制迁移脚本的文件夹。
  3. 通过运行以下命令,将数据上传到对象存储:
    注意:运行主脚本之前,请确保提供将备份数据复制到对象存储的绝对文件夹路径。使用 CEPH_BACKUP_PATH 变量指定路径。
    export CEPH_BACKUP_PATH=/ceph/backup/path 
    export CEPH_OPERATION=restore
    export CEPH_RESTORE_CLEAN=true # set this to false to allow restore without deleting existing data
    ./objectstore-migration.shexport CEPH_BACKUP_PATH=/ceph/backup/path 
    export CEPH_OPERATION=restore
    export CEPH_RESTORE_CLEAN=true # set this to false to allow restore without deleting existing data
    ./objectstore-migration.sh
  4. 如果上传成功,您应该会看到以下输出:
    job.batch/ceph-objectstore-ondemand-restore-job created
    job.batch/ceph-objectstore-ondemand-restore-job condition metjob.batch/ceph-objectstore-ondemand-restore-job created
    job.batch/ceph-objectstore-ondemand-restore-job condition met

此页面是否有帮助?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath 白色徽标
信任与安全
© 2005-2024 UiPath. All rights reserved.