You can install the OADP Operator from the Openshift's OperatorHub.
You can search for the operator using keywords such as oadp or velero.
Now click on Install
Finally, click on Install again. This will create namespace openshift-adp
if it does not exist, and install the OADP operator in it.
Before creating a DataProtectionApplication (DPA) CR, ensure you have created a secret
cloud-credentials in namespace openshift-adp.
Make sure your credentials file is in the proper format. For example, if using AWS, it should look like:
[<INSERT_PROFILE_NAME>]
aws_access_key_id=<INSERT_VALUE>
aws_secret_access_key=<INSERT_VALUE>
Note: Do not use quotes while putting values in place of INSERT_VALUE Placeholders
$ oc create secret generic cloud-credentials --namespace openshift-adp --from-file cloud=<CREDENTIALS_FILE_PATH>
Create an instance of the DataProtectionApplication (DPA) CR by clicking on Create Instance as highlighted below:
The Velero instance can be created by selecting configurations using the OCP Web UI or by using a YAML file as mentioned below.
Finally, set the CR spec values appropriately, and click on Create.
The CR values are mentioned for ease of use. Please remember to mention default: true in backupStorageLocations if you intend on using the default backup storage location as shown below.
apiVersion: oadp.openshift.io/v1alpha1
kind: DataProtectionApplication
metadata:
name: dpa-sample
spec:
configuration:
velero:
defaultPlugins:
- openshift
- aws
nodeAgent:
enable: true
uploaderType: restic #[restic, kopia]
backupLocations:
- name: default
velero:
provider: aws
default: true
objectStorage:
bucket: my-bucket
prefix: my-prefix
config:
region: us-east-1
profile: "default"
credential:
name: cloud-credentials
key: cloud
snapshotLocations:
- name: default
velero:
provider: aws
config:
region: us-west-2
profile: "default"
-
Verify the DPA has been reconciled successfully:
$ oc get dpa dpa-sample -n openshift-adp NAME RECONCILED AGE dpa-sample True 2m51s
Note:
RECONCILEDcolumn must beTrue. -
To verify all of the correct resources have been created, the following command
oc get all -n openshift-adpshould look similar to:NAME READY STATUS RESTARTS AGE pod/node-agent-9pjz9 1/1 Running 0 3d17h pod/node-agent-fmn84 1/1 Running 0 3d17h pod/node-agent-xw2dg 1/1 Running 0 3d17h pod/openshift-adp-controller-manager-76b8bc8d7b-kgkcw 1/1 Running 0 3d17h pod/velero-64475b8c5b-nh2qc 1/1 Running 0 3d17h NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/openshift-adp-controller-manager-metrics-service ClusterIP 172.30.194.192 <none> 8443/TCP 3d17h service/openshift-adp-velero-metrics-svc ClusterIP 172.30.190.174 <none> 8085/TCP 3d17h NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE daemonset.apps/node-agent 3 3 3 3 3 <none> 3d17h NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/openshift-adp-controller-manager 1/1 1 1 3d17h deployment.apps/velero 1/1 1 1 3d17h NAME DESIRED CURRENT READY AGE replicaset.apps/openshift-adp-controller-manager-76b8bc8d7b 1 1 1 3d17h replicaset.apps/openshift-adp-controller-manager-85fff975b8 0 0 0 3d17h replicaset.apps/velero-64475b8c5b 1 1 1 3d17h replicaset.apps/velero-8b5bc54fd 0 0 0 3d17h replicaset.apps/velero-f5c9ffb66 0 0 0 3d17hNote: The node-agent Pods are created only if using
resticorkopiain DPA.Note: The node-agent Pods are labeled as
resticin older installations. -
Verify the BackupStorageLocations
oc get backupStorageLocation -n openshift-adp NAME PHASE LAST VALIDATED AGE DEFAULT dpa-sample-1 Available 1s 3d16h trueNote: the
PHASEset toAvailable.




