Backing up workloads on OADP with OpenShift Container Platform¶
To back up and restore workloads on ROSA, you can use OADP. You can create a backup of a workload, restore it from the backup, and verify the restoration. You can also clean up the OADP Operator, backup storage, and AWS resources when they are no longer needed.
Example: Performing a backup with OADP and OpenShift Container Platform¶
Perform a backup by using OpenShift API for Data Protection (OADP) with OpenShift Container Platform. The following example hello-world application has no persistent volumes (PVs) attached.
Either Data Protection Application (DPA) configuration will work.
Procedure
-
Create a workload to back up by running the following commands:
-
Expose the route by running the following command:
-
Check that the application is working by running the following command:
You should see an output similar to the following example:
-
Back up the workload by running the following command:
-
Wait until the backup is complete, and then run the following command:
You should see an output similar to the following example:
-
Delete the demo workload by running the following command:
-
Restore the workload from the backup by running the following command:
-
Wait for the Restore to finish by running the following command:
You should see an output similar to the following example:
-
Check that the workload is restored by running the following command:
You should see an output similar to the following example:
-
Check the JSONPath by running the following command:
You should see an output similar to the following example:
Note
For troubleshooting tips, see the troubleshooting documentation.
Cleaning up a cluster after a backup with OADP and ROSA STS¶
Uninstall the OpenShift API for Data Protection (OADP) Operator together with the backups and the S3 bucket from the hello-world example.
Procedure
-
Delete the workload by running the following command:
-
Delete the Data Protection Application (DPA) by running the following command:
-
Delete the cloud storage by running the following command:
-
If the Operator is no longer required, remove it by running the following command:
-
Remove the namespace from the Operator:
-
If the backup and restore resources are no longer required, remove them from the cluster by running the following command:
-
To delete backup, restore and remote objects in AWS S3 run the following command:
-
If you no longer need the Custom Resource Definitions (CRD), remove them from the cluster by running the following command:
-
Delete the AWS S3 bucket by running the following commands:
-
Detach the policy from the role by running the following command:
-
Delete the role by running the following command: