Chapter 2. Creating Red Hat Ansible Automation Platform backup resources
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.
2.1. Back up your Ansible Automation Platform deployment Copy linkLink copied to clipboard!
Regularly backing up your Ansible Automation Platform deployment is vital to protect against unexpected data loss and application errors. Ansible Automation Platform hosts any enabled components (such as, automation controller, automation hub, and Event-Driven Ansible), when you back up Ansible Automation Platform the operator will also back up these components.
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.
Prerequisites
- 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.
Procedure
- Log in to Red Hat OpenShift Container Platform.
-
Navigate to
. - Select your Ansible Automation Platform Operator deployment.
- Go to your All Instances tab, and click .
Select Ansible Automation Platform Backup from the list.
NoteWhen creating the Ansible Automation Platform Backup resource it also creates backup resources for each of the nested components that are enabled.
- In the Name field, enter a name for the backup.
- In the Deployment name field, enter the name of the deployed Ansible Automation Platform instance being backed up. For example if your Ansible Automation Platform deployment must be backed up and the deployment name is aap, enter 'aap' in the Deployment name field.
Click . This results in an AnsibleAutomationPlatformBackup resource similar to the following:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verification
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
2.2. Define a custom backup Persistent Volume Claim Copy linkLink copied to clipboard!
Define a custom Persistent Volume Claim (PVC) to automate the allocation of specific storage classes and volume sizes for backups. This configuration ensures your backup storage is appropriately sized and adheres to environment-specific storage policies.
Prerequisites
- 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
Create a backup YAML file (for example,
custom-pvc-backup.yaml) with thebackup_pvcandbackup_storage_requirementsparameters:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Apply the configuration:
oc apply -f custom-pvc-backup.yaml
oc apply -f custom-pvc-backup.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Confirm the creation of the PVC by running the following command:
oc get pvc custom-aap-backup-pvc -n <namespace>
oc get pvc custom-aap-backup-pvc -n <namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.3. Override backup configurations for specific components Copy linkLink copied to clipboard!
You can override the global backup configuration for specific components, such as automation controller, private automation hub, or Event-Driven Ansible controller. This ensures that each component uses the appropriate storage class or resource limits during the backup process.
Example: Overriding component resources This example shows a backup custom resource that applies a fast SSD storage class to the automation controller while using standard storage for the private automation hub:
+