About backup and recovery
Red Hat recommends backing up deployments of Red Hat Ansible Automation Platform in your Red Hat OpenShift Container Platform environment to prevent data loss.
A backup resource of your Red Hat Ansible Automation Platform deployment includes the following:
- Custom deployment of specific values in the
specsection of the Ansible Automation Platform custom resource object. - Back up of the
postgresqldatabase. secret_key,admin_password, andbroadcast_websocketsecrets.- Database configuration.
Be sure to secure your backup resources because they can include sensitive information.
Backup recommendations Copy linkLink copied!
Recovering from data loss requires that you plan for and create backup resources of your Red Hat Ansible Automation Platform deployments on a regular basis. At a minimum, Red Hat recommends backing up deployments of Red Hat Ansible Automation Platform under the following circumstances:
- Before upgrading your Red Hat Ansible Automation Platform deployments.
- Before upgrading your OpenShift cluster.
- Once per week. This is particularly important if your environment is configured for automatic upgrades.
Backup database compression for operator-based deployments Copy linkLink copied!
Ansible Automation Platform 2.6 supports database compression for operator-based backup operations. You can enable or disable compression globally or per component to optimize backup size and performance.
When you enable database compression, the operator compresses the PostgreSQL database dump for each component. This reduces the overall backup size but increases CPU usage during the backup process.
Backup compression configuration parameters Copy linkLink copied!
Use these compression parameters to configure the AnsibleAutomationPlatformBackup custom resource:
| Parameter | Description | Default |
|---|---|---|
spec.use_db_compression |
Enables or disables database dump compression for all components globally. | True |
spec.gateway.use_db_compression |
Overrides the global compression setting for the platform gateway. | Value ofspec.use_db_compression |
spec.controller.use_db_compression |
Overrides the global compression setting for automation controller. | Value ofspec.use_db_compression |
spec.hub.use_db_compression |
Overrides the global compression setting for automation hub. | Value ofspec.use_db_compression |
spec.eda.use_db_compression |
Overrides the global compression setting for Event-Driven Ansible. | Value ofspec.use_db_compression |
When you set a per-component parameter, it overrides the global spec.use_db_compression value for that component only.
Configure backup compression Copy linkLink copied!
Configure database compression for your Ansible Automation Platform backup by setting compression parameters in the AnsibleAutomationPlatformBackup custom resource.
Before you begin Copy linkLink copied!
- You have installed Ansible Automation Platform 2.6 by using the operator.
- You have administrator access to the Red Hat OpenShift Container Platform cluster.
Procedure Copy linkLink copied!
Results Copy linkLink copied!
$ oc get ansibleautomationplatformbackup <backup_name> -n aap -o jsonpath='{.status.conditions}'
The output shows a Successful condition when the backup completes.