第 2 章 创建 Red Hat Ansible Automation Platform 备份资源
备份 Red Hat Ansible Automation Platform 部署涉及为部署的自动化中心和自动化控制器实例创建备份资源。使用以下步骤为 Red Hat Ansible Automation Platform 部署创建备份资源。
2.1. 备份 Automation 控制器部署
使用这个流程备份控制器的部署,包括作业、清单和凭证。
先决条件
- 您必须使用 Openshift 集群进行身份验证。
- Ansible Automation Platform Operator 已安装到集群中。
- 自动化控制器使用 Ansible Automation Platform Operator 部署到。
流程
- 登录到 Red Hat OpenShift Container Platform。
-
进入到
。 - 选择项目命名空间中安装的 Ansible Automation Platform Operator。
- 选择 Automation Controller Backup 选项卡。
- 点 。
- 输入备份的名称。
-
输入正在备份的部署的 Ansible Automation Platform 实例的 Deployment 名称。例如,如果您的自动化控制器必须备份,且部署名称为
aap-controller
,在 Deployment name 字段中输入 'aap-controller'。 如果要使用自定义、预先创建的 pvc:
- (可选)输入备份持久性卷声明的名称。
(可选)输入 Backup PVC 存储要求,以及 Backup PVC 存储类。
注意如果没有提供 pvc 或存储类,集群的默认存储类将用于创建 pvc。
如果您有大型数据库,根据备份管理 pod 资源要求中的内容指定您的存储请求。
注意您可以在 postgres pod 中运行以下命令来检查现有 postgres 数据库数据目录的大小。
$ df -h | grep "/var/lib/pgsql/data"
点
。创建指定部署的备份 tarball,并可用于数据恢复或部署回滚。将来的备份存储在同一 pvc 上的单独 tar 文件中。
验证
- 登录到 Red Hat OpenShift Container Platform
-
进入到
。 - 选择项目命名空间中安装的 Ansible Automation Platform Operator。
- 选择 AutomationControllerBackup 选项卡。
- 选择您要验证的备份资源。
滚动到 Conditions,并检查 Successful 状态为
True
。注意如果 Successful 为
False
,备份会失败。检查自动化控制器 Operator 日志中的错误以修复问题。