Ansible AWX Backup and Restore on Kubernetes: A Practical Disaster Recovery Guide
Description and use
Guide for backing up and restoring Ansible AWX on Kubernetes, detailing AWXBackup creation, external PVC storage, and off‑cluster copy of the archive.
Problem
Ensuring reliable backup and recovery of an Ansible AWX deployment on Kubernetes without relying on the original cluster nodes.
Outcome
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.
Workflow
- 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.
Evidence
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…
- Record date: 2026-11-03T16:14:11.666Z