Backup and recovery for operator environments


Red Hat Ansible Automation Platform 2.5

Safeguard against data loss with backup and recovery of Ansible Automation Platform operator on OpenShift Container Platform

Red Hat Customer Content Services

Abstract

This guide provides procedures and reference information to backup and recover installations of the Red Hat Ansible Automation Platform operator on OpenShift Container Platform.

Preface

Thank you for your interest in Red Hat Ansible Automation Platform. Ansible Automation Platform is a commercial offering that helps teams manage complex multi-tier deployments by adding control, knowledge, and delegation to Ansible-powered environments.

Use the procedures in this guide to create backup resources that can be used for recovering your Red Hat Ansible Automation Platform deployment in the event of a failure.

Providing feedback on Red Hat documentation

If you have a suggestion to improve this documentation, or find an error, you can contact technical support at https://access.redhat.com to open a request.

To safeguard against unexpected data loss and application errors, it is critical that you perform periodic backups of your Red Hat Ansible Automation Platform deployment. In addition to data loss prevention, backups allow you to fall back to a different deployment state.

1.1. 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 spec section of the Ansible Automation Platform custom resource object.
  • Back up of the postgresql database.
  • secret_key, admin_password, and broadcast_websocket secrets.
  • Database configuration.
Note

Be sure to secure your backup resources because they can include sensitive information.

1.1.1. Backup recommendations

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.

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.

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.

Note

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

  1. Log in to Red Hat OpenShift Container Platform.
  2. Navigate to OperatorsInstalled Operators.
  3. Select your Ansible Automation Platform Operator deployment.
  4. Go to your All Instances tab, and click Create New.
  5. Select Ansible Automation Platform Backup from the list.

    Note

    When creating the Ansible Automation Platform Backup resource it also creates backup resources for each of the nested components that are enabled.

  6. In the Name field, enter a name for the backup.
  7. 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.
  8. Click Create. This results in an AnsibleAutomationPlatformBackup resource similar to the following:

    apiVersion: aap.ansible.com/v1alpha1
    kind: AnsibleAutomationPlatformBackup
    metadata:
      name: backup
      namespace: aap
    spec:
      no_log: true
      deployment_name: aap
    Copy to Clipboard Toggle word wrap

    Verification

    To verify that your backup was successful you can:

  9. Log in to Red Hat OpenShift Container Platform.
  10. Navigate to OperatorsInstalled Operators.
  11. Select your Ansible Automation Platform Operator deployment.
  12. 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

If you lose information on your system or experience issues with an upgrade, you can use the backup resources of your deployment instances. Use the following procedures to recover your Ansible Automation Platform deployment files.

Ansible Automation Platform manages any enabled components (such as, automation controller, automation hub, and Event-Driven Ansible), when you recover Ansible Automation Platform you also restore these components.

In previous versions of the Ansible Automation Platform Operator, it was necessary to create a restore object for each component of the platform. Now, you create a single AnsibleAutomationPlatformRestore resource, which creates and manages the other restore objects:

  • AutomationControllerRestore
  • AutomationHubRestore
  • EDARestore

Prerequisites

  • You must be authenticated with an OpenShift cluster.
  • You have installed the Ansible Automation Platform Operator on the cluster.
  • The AnsibleAutomationPlatformBackups deployment is available in your cluster.

Procedure

  1. Log in to Red Hat OpenShift Container Platform.
  2. Navigate to OperatorsInstalled Operators.
  3. Select your Ansible Automation Platform Operator deployment.
  4. Go to your All Instances tab, and click Create New.
  5. Select Ansible Automation Platform Restore from the list.
  6. For Name enter the name for the recovery deployment.
  7. For New Ansible Automation Platform Name enter the new name for your Ansible Automation Platform instance.
  8. Backup Source defaults to CR.
  9. For Backup name enter the name you chose when creating the backup.
  10. Click Create.

Verification

Your backups starts restoring under the AnsibleAutomationPlatformRestores tab.

Note

The recovery is not complete until all the resources are successfully restored. Depending on the size of your database this this can take some time.

To verify that your recovery was successful you can:

  1. Go to WorkloadsPods.
  2. Confirm that all pods are in a Running or Completed state.

A persistent volume claim (PVC) is a storage volume that stores data for automation hub and automation controller applications. These PVCs are independent of the applications and persist even if an application is deleted. You can restore data from a PVC as an alternative to recovering from an Ansible Automation Platform backup.

For more information see the Finding and deleting PVCs section of the Installing on OpenShift Container Platform guide.

Prerequisites

  • You have an existing PVC containing a backup.
  • You have installed the Ansible Automation Platform Operator on Red Hat OpenShift Container Platform.

Procedure

  1. Log in to Red Hat OpenShift Container Platform.
  2. Navigate to OperatorsInstalled Operators.
  3. Select your Ansible Automation Platform Operator deployment.
  4. Go to your All Instances tab, and click Create New.
  5. Select Ansible Automation Platform Restore from the list.
  6. For Name enter the name for the recovery deployment.
  7. For New Ansible Automation Platform Name enter the new name for your Ansible Automation Platform instance.
  8. For Backup Source select PVC.

    1. Backup PVC: Enter the name of your PVC.
    2. Backup Directory: Enter the path to your backup directory on your PVC.
  9. For Backup name enter the name you chose when creating the backup.
  10. Under YAML view paste in the following example:

    ---
    apiVersion: aap.ansible.com/v1alpha1
    kind: AnsibleAutomationPlatformRestore
    metadata:
      name: aap
    spec:
      deployment_name: aap
      backup_source: PVC
      backup_pvc: aap-backup-claim
      backup_dir: '/backups/aap-openshift-backup-2025-06-23-18:28:29'
    
      controller:
        backup_source: PVC
        backup_pvc: aap-controller-backup-claim
        backup_dir: '/backups/tower-openshift-backup-2025-06-23-182910'
    
      hub:
        backup_source: PVC
        backup_pvc: aap-hub-backup-claim
        backup_dir: '/backups/openshift-backup-2025-06-23-182853'
        storage_type: file
    
      eda:
        backup_source: PVC
        backup_pvc: aap-eda-backup-claim
        backup_dir: '/backups/eda-openshift-backup-2025-06-23-18:29:11'
    Copy to Clipboard Toggle word wrap
  11. Click Create.

Verification

Your backups restore under the AnsibleAutomationPlatformRestores tab.

Note

The recovery is not complete until all the resources are successfully restored. Depending on the size of your database this this can take some time.

  1. Go to WorkloadsPods.
  2. Confirm that all pods are in a Running or Completed state.

You can restore an external database on Red Hat OpenShift Container Platform using the Operator. Use the following procedure to restore from an external database.

Important

Restoring from an external database force drops the database, which overrides your existing external database.

Prerequisites

  • You have an external database.
  • You have installed the Ansible Automation Platform Operator on OpenShift Container Platform.

Procedure

  1. Log in to Red Hat OpenShift Container Platform.
  2. Navigate to OperatorsInstalled Operators.
  3. Select your Ansible Automation Platform Operator deployment.
  4. Go to your All Instances tab, and click Create New.
  5. Select Ansible Automation Platform Restore from the list.
  6. For Name enter the name for the recovery deployment.
  7. For New Ansible Automation Platform Name enter the new name for your Ansible Automation Platform instance.

    • If restoring to the same name Ansible Automation Platform then you must add force_drop_db: true to drop the database on restore.
  8. Backup Source defaults to CR.
  9. For Backup name enter the name you chose when creating the backup. Under YAML view paste in the following example:

    ---
    apiVersion: aap.ansible.com/v1alpha1
    kind: AnsibleAutomationPlatformRestore
    metadata:
      name: aaprestore
    spec:
      deployment_name: aap
      backup_name: aapbackup
      controller:
        force_drop_db: true
    Copy to Clipboard Toggle word wrap
  10. Click Create.

Verification

Your backups starts restoring under the AnsibleAutomationPlatformRestores tab.

Note

The recovery is not complete until all the resources are successfully restored. Depending on the size of your database this this can take some time.

To verify that your recovery was successful you can:

  1. Go to WorkloadsPods.
  2. Confirm that all pods are in a Running or Completed state.

Chapter 4. Troubleshooting

Use this information to diagnose and resolve issues during backup and recovery.

The name specified for the new AutomationController custom resource must not match an existing deployment or the recovery process will fail.

If your AutomationController customer resource matches an existing deployment, perform the following steps to resolve the issue.

Procedure

  1. Delete the existing AutomationController and the associated postgres PVC:

    oc delete automationcontroller <YOUR_DEPLOYMENT_NAME> -n <YOUR_NAMESPACE>
    
    oc delete pvc postgres-13-<YOUR_DEPLOYMENT_NAME>-13-0 -n <YOUR_NAMESPACE>
    Copy to Clipboard Toggle word wrap
  2. Use AutomationControllerRestore with the same deployment_name in it:

    oc apply -f restore.yaml
    Copy to Clipboard Toggle word wrap

Legal Notice

Copyright © 2025 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat