Chapter 3. Recovering a Red Hat Ansible Automation Platform deployment
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.
3.1. Recovering your Ansible Automation Platform deployment Copy linkLink copied to clipboard!
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
- 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 Restore from the list.
- For Name enter the name for the recovery deployment.
- For New Ansible Automation Platform Name enter the new name for your Ansible Automation Platform instance.
- Backup Source defaults to CR.
- For Backup name enter the name you chose when creating the backup.
- Click .
Verification
Your backups starts restoring under the AnsibleAutomationPlatformRestores tab.
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:
-
Go to
. - Confirm that all pods are in a Running or Completed state.
3.2. Recovering your Ansible Automation Platform deployment from a PVC Copy linkLink copied to clipboard!
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
- 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 Restore from the list.
- For Name enter the name for the recovery deployment.
- For New Ansible Automation Platform Name enter the new name for your Ansible Automation Platform instance.
For Backup Source select PVC.
- Backup PVC: Enter the name of your PVC.
- Backup Directory: Enter the path to your backup directory on your PVC.
- For Backup name enter the name you chose when creating the backup.
Under YAML view paste in the following example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Click .
Verification
Your backups restore under the AnsibleAutomationPlatformRestores tab.
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.
-
Go to
. - Confirm that all pods are in a Running or Completed state.
3.3. Recovering your Ansible Automation Platform deployment from an external database Copy linkLink copied to clipboard!
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.
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
- 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 Restore from the list.
- For Name enter the name for the recovery deployment.
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: trueto drop the database on restore.
-
If restoring to the same name Ansible Automation Platform then you must add
- Backup Source defaults to CR.
For Backup name enter the name you chose when creating the backup. Under YAML view paste in the following example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Click .
Verification
Your backups starts restoring under the AnsibleAutomationPlatformRestores tab.
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:
-
Go to
. - Confirm that all pods are in a Running or Completed state.