Back up your Ansible Automation Platform deployment
Backing up your Red Hat Ansible Automation Platform deployment involves creating backup resources for your deployed instances.
Use the following procedures to create backup resources for your Red Hat Ansible Automation Platform deployment. We recommend taking backups before upgrading the Ansible Automation Platform Operator. Take a backup regularly in case you want to restore the platform to a previous state.
Back up your Ansible Automation Platform deployment Copy linkLink copied!
Regularly backing up your Ansible Automation Platform deployment is vital to protect against data loss. When you back up the platform, the operator automatically backs up all enabled components, including automation controller, automation hub, and Event-Driven Ansible.
Before you begin Copy linkLink copied!
- You must be authenticated on OpenShift cluster.
- You have installed Ansible Automation Platform Operator on the cluster.
- You have deployed a Ansible Automation Platform instance using the Ansible Automation Platform Operator.
About this task Copy linkLink copied!
Ansible Automation Platform Operator creates a PersistentVolumeClaim (PVC) for your Ansible Automation Platform Backup automatically. You can use your own pre-created PVC by using the backup_pvc spec and specifying your PVC.
Procedure Copy linkLink copied!
Results Copy linkLink copied!
To verify that your backup was successful you can:
- Log in to Red Hat OpenShift Container Platform.
- Navigate to .
- Select your Ansible Automation Platform Operator deployment.
- Click All Instances.
The All Instances page displays the main backup and the backups for each component with the name you specified when creating your backup resource. The status for the following instances must be either Running or Successful:
- AnsibleAutomationPlatformBackup
- AutomationControllerBackup
- EDABackup
- AutomationHubBackup
Define custom backup Persistent Volume Claims Copy linkLink copied!
Define a custom Persistent Volume Claims (PVCs) to control backup storage allocation for each Ansible Automation Platform component. Specify unique PVC names, storage classes, and volume sizes at both global and component levels to differentiate between backup runs.
Before you begin Copy linkLink copied!
- You have an active Red Hat Ansible Automation Platform deployment on OpenShift Container Platform.
- You have the
ocCLI tool installed and cluster administrator access.
Procedure Copy linkLink copied!
Results Copy linkLink copied!
oc get pvc -n <namespace>
| Name | Status | Volume | Capacity | Access Modes | Storage class |
|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Custom backup configurations for specific components Copy linkLink copied!
You can override the global backup configuration for specific components, such as automation controller, private automation hub, or Event-Driven Ansible controller. This enables each component to use its own storage class, PVC name, storage size, or resource limits during the backup process.
Example: Overriding component resources
In this backup custom resource, each component has a unique PVC name and storage class::
apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatformBackup
metadata:
name: custom-backup
spec:
deployment_name: myaap
no_log: false
backup_storage_class: rook-cephfs <1>
hub:
backup_pvc: custom-hub-backup-pvc <2>
backup_storage_requirements: 25Gi
backup_storage_class: rook-cephfs
create_backup_pvc: true
no_log: false
controller:
backup_pvc: custom-controller-backup-pvc
backup_storage_requirements: 15Gi
backup_storage_class: rook-block <3>
create_backup_pvc: true
no_log: false
eda:
backup_pvc: custom-eda-backup-pvc
backup_storage_requirements: 7Gi
backup_storage_class: rook-block
create_backup_pvc: true
no_log: false
-
The global `backup_storage_class` applies to the platform gateway. Components that do not specify their own `backup_storage_class` inherit this value.
-
Each component can define its own `backup_pvc` to create a uniquely named PVC. Set `create_backup_pvc: true` to have the operator create the PVC automatically.
-
Component-level values, such as `backup_storage_class: rook-block`, override the global setting for that component.
Resolve naming conflicts when deploying an Automation Controller custom resource Copy linkLink copied!
If your AutomationController customer resource matches an existing deployment, perform the following steps to resolve the issue.
About this task Copy linkLink copied!
The name specified for the new AutomationController custom resource must not match an existing deployment or the recovery process will fail. Persistent volume claims (PVCs) and Secrets remain after a deployment is deleted. If you want to reuse the same name you must delete previous PVCs and Secrets before creating a new custom resource.