Bootstrap FreeKB - OpenShift - Create OpenShift API for Data Protection (OADP) Data Protection Application
OpenShift - Create OpenShift API for Data Protection (OADP) Data Protection Application

Updated:   |  OpenShift articles

This assumes you have already

Let's say we want to store OADP backups in an Amazon Web Services S3 Bucket. This assumes you have already created and configured an S3 Bucket. If not, check out my article OpenShift - Store OpenShift API for Data Protection (OADP) objects in an Amazon Web Services (AWS) S3 Bucket.

Let's say the name of your S3 Bucket is my-bucket-asdfadkjsfasfljdf and the name of your backupStorageLocation is my-backup-storage-location.

~]$ oc get backupStorageLocations --namespace openshift-adp
NAME                          PHASE       LAST VALIDATED   AGE   DEFAULT
my-backup-storage-location    Available   60s              64s   true

 

Let's create a YAML file that contains the following, replacing my-bucket-asdfadkjsfasfljdf with the name of your S3 Bucket.

apiVersion: oadp.openshift.io/v1alpha1
kind: DataProtectionApplication
metadata:
  name: my-data-protection-application
  namespace: openshift-adp
spec:
  backupImages: false
  backupLocations:
    - name: my-backup-storage-location
      velero:
        default: true
        config:
          region: us-east-1
          profile: default
        credential:
          key: cloud
          name: cloud-credentials
        objectStorage:
          bucket: my-bucket-asdfadkjsfasfljdf
        provider: aws
  configuration:
    velero:
      defaultPlugins:
        - openshift
        - aws
      nodeSelector: worker
      resourceTimeout: 10m

 

Let's use the oc apply command to create my-data-protection-application.

oc apply --filename my-data-protection-application.yaml

 

Or in the OpenShift console, at Operators > Installed Operators > OADP select DataProtectionApplication create instance.

 

And then complete the form or use the YAML option to create the Data Protection Application.

 

In this example, since the backups are going to be stored in an Amazon Web Services (AWS) S3 Bucket, the velero defaultPlugins will need to include aws.

 

And the Backup Locations will need to include the name of the S3 Bucket.

 

 

Let's ensure the status is Reconciled.

~]$ oc describe DataProtectionApplication --namespace openshift-adp
. . .
Status:
  Conditions:
    Last Transition Time:  2025-04-10T01:25:11Z
    Message:               Reconcile complete
    Reason:                Complete
    Status:                True
    Type:                  Reconciled

 

Or in the OpenShift console, at Operators > Installed Operators > OADP select DataProtectionApplication check to see if the status is Reconciled.

 

The Data Protection Application should provision additional "velero" resources in the openshift-adp namespace.

~]$ oc get all --namespace openshift-adp
NAME                                                    READY   STATUS    RESTARTS   AGE
pod/openshift-adp-controller-manager-55f68b778f-tlr8v   1/1     Running   0          8m52s
pod/velero-6777878978-nvqm4                             1/1     Running   0          3m10s

NAME                                                       TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE
service/openshift-adp-controller-manager-metrics-service   ClusterIP   172.30.220.147   <none>        8443/TCP   9m3s
service/openshift-adp-velero-metrics-svc                   ClusterIP   172.30.87.161    <none>        8085/TCP   3m10s

NAME                                               READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/openshift-adp-controller-manager   1/1     1            1           8m52s
deployment.apps/velero                             1/1     1            1           3m10s

NAME                                                          DESIRED   CURRENT   READY   AGE
replicaset.apps/openshift-adp-controller-manager-55f68b778f   1         1         1       8m52s
replicaset.apps/velero-6777878978                             1         1         1       3m10s

 

Next let's check to see if the backupStorageLocation is Available.

~]$ oc get backupStorageLocations --namespace openshift-adp
NAME                PHASE       LAST VALIDATED   AGE   DEFAULT
my-aws-s3-bucket    Available   60s              64s   true

 

Or in the OpenShift console, at Operators > Installed Operators > OADP select BackupStorageLocations and check to see if the phase is Available.

 

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 2864ab in the box below so that we can be sure you are a human.