UiPath Documentation
automation-suite
2023.10
false
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。

Linux 版 Automation Suite 安装指南

将 Looker 数据迁移到 Automation Suite

使用此过程将 Looker 数据从独立版 Insights 迁移到 Insights Automation Suite。

步骤 1:从 Insights Linux Server 创建备份 TAR 文件

  1. 打开 SSH 客户端并运行以下命令进行身份验证。

    ssh <username>@<hostname>
    ssh <username>@<hostname>
    

  2. 创建备份。

    image=$(sudo docker container inspect looker-container -f '{{ .Image }}')
    backupPath="$HOME/insights/backup" && mkdir "$backupPath" -p
    sudo docker run -u root --rm --platform linux --volumes-from looker-container -v "$backupPath":/backup "$image" bash -c "tar cvf /backup/looker_backup.tar --absolute-names /app/workdir/.db /mnt/lookerfiles /app/workdir/looker.key"
    image=$(sudo docker container inspect looker-container -f '{{ .Image }}')
    backupPath="$HOME/insights/backup" && mkdir "$backupPath" -p
    sudo docker run -u root --rm --platform linux --volumes-from looker-container -v "$backupPath":/backup "$image" bash -c "tar cvf /backup/looker_backup.tar --absolute-names /app/workdir/.db /mnt/lookerfiles /app/workdir/looker.key"
    
    备注:

    从 2022.10 版本开始,looker.key 包含在迁移备份中。

  3. 退出 SSH。

    exit
    exit
    
  4. 使用安全复制协议 (SCP) 将文件复制到本地计算机。

    scp <username>@<hostname>:~\insights\backup\looker_backup.tar <path-to-download-dir>
    scp <username>@<hostname>:~\insights\backup\looker_backup.tar <path-to-download-dir>
    

步骤 2:还原 Looker

  1. 下载 kubeconfig 文件。以下屏幕截图显示了 Automation Suite 的 Azure 部署模板

  2. 打开 SSH 客户端并运行以下命令以获取 Insights Looker Pod 名称

    $Env:KUBECONFIG="C:\Users\username\Downloads\output.yaml" # path to the optput.yaml
    kubectl get pods -n uipath
    $Env:KUBECONFIG="C:\Users\username\Downloads\output.yaml" # path to the optput.yaml
    kubectl get pods -n uipath
    
  3. Insights Looker Pod 现已列出(例如 insights-insightslooker-c987df55c-gngqd)。

  4. 为 Insights Looker Pod 设置变量名称。

    $PodName = "insights-insightslooker-74db798bc5-dt68p"
    $PodName = "insights-insightslooker-74db798bc5-dt68p"
    
  5. 为 Automation Suite 数据创建备份。备份文件将存储在包含已启动命令的控制台的计算机上。请务必删除已创建的备份,因为其中包含敏感信息。

    kubectl cp ${PodName}:/app/workdir/.db/ .\sf_db_backup -n uipath -c insightslooker
    kubectl cp ${PodName}:/mnt/lookerfiles/ .\sf_lookerfiles_backup -n uipath -c insightslooker
    kubectl cp ${PodName}:/app/workdir/.db/ .\sf_db_backup -n uipath -c insightslooker
    kubectl cp ${PodName}:/mnt/lookerfiles/ .\sf_lookerfiles_backup -n uipath -c insightslooker
    
  6. 从 Insights Linux 服务器解压 TAR 文件。

    7z x .\looker_backup.tar -olooker_backup # looker_backup is the output folder
    7z x .\looker_backup.tar -olooker_backup # looker_backup is the output folder
    
  7. (如果 Automation Suite 密码与独立部署模型中使用的密码不同,则为必需)在迁移前编辑以下文件,并在looker.loglooker.script文件中更新 URL 和/或密码。

    打开 sf_db_backup/looker.log 并搜索 host_url 以查找以 https:// 开头的字符串。

    sf_db_backup/looker.log 中搜索 INSERT INTO "CREDENTIALS_EMAIL" VALUES(1,1,'admin@uipath.com'

    复制以 $2a$12$ 开头的字符串,并覆盖 looker_backup/app/.db/looker.log 中出现的所有字符串。

    备注:
    • 如果找不到这些行,请在编辑器中关闭正则表达式。
    • 如果 INSERT INTO "CREDENTIALS_EMAIL" VALUES(1,1,'admin@uipath.com' 多次出现,则需要更新所有这些字符串。
  8. 将工作目录更改为 looker_backup 文件夹。在此文件夹中,您将看到两个名为 appmnt 的子文件夹。

      cd looker_backup
      cd looker_backup
    
  9. 将文件复制到 Insights Looker Pod,然后重新启动部署。

    kubectl cp .\app\workdir ${PodName}:/app -n uipath -c insightslooker
    kubectl cp .\mnt\lookerfiles ${PodName}:/mnt -n uipath -c insightslooker
    kubectl rollout restart statefulset insights-insightslooker -n uipath
    kubectl cp .\app\workdir ${PodName}:/app -n uipath -c insightslooker
    kubectl cp .\mnt\lookerfiles ${PodName}:/mnt -n uipath -c insightslooker
    kubectl rollout restart statefulset insights-insightslooker -n uipath
    

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新