Ansible AWX Backup and Restore on Kubernetes: A Practical Disaster Recovery Guide
Описание и применение
Руководство по резервному копированию и восстановлению Ansible AWX в Kubernetes, включающее создание ресурса AWXBackup, хранение архива на отдельном PVC и копирование резервной копии вне кластера.
Задача
Ensuring reliable backup and recovery of an Ansible AWX deployment on Kubernetes without relying on the original cluster nodes.
Результат
The guide provides a repeatable, cluster‑independent backup strategy for AWX, ensuring that database, secrets, and configuration can be restored even if the original Kubernetes nodes are lost.
Рабочий процесс
- 1. Prepare an external PVC for backup storage using a suitable StorageClass.
- 2. Create an AWXBackup manifest specifying the AWX custom resource name and backup PVC.
- 3. Apply the manifest with
kubectl apply -f awx-backup.yamland monitor the resource status. - 4. Verify completion via
kubectl get awxbackup -n awxandkubectl describe awxbackup. - 5. Retrieve backup PVC name and directory from the AWXBackup status using jsonpath queries.
- 6. Copy the backup archive from the PVC to external storage (e.g., object storage).
- 7. Secure the copy with encryption and apply retention policies.
Доказательства
The AWX Operator 2.19.1 backup role documents these components: 1) Custom deployment-specific values from the AWX custom resource. 2) PostgreSQL database backup. 3) AWX secret key. 4) Administrator password secret. 5) Broadcast WebSocket secret. 6) Database configuration.
I would not consider the recovery plan complete if the only copy of the backup remains on the same Kubernetes cluster.
Create a file named awx-backup.yaml…
- Дата записи: 2026-11-03T16:14:11.666Z