Using the legacy-aws Velero plugin
If you are using an AWS S3-compatible backup storage location, you might get a SignatureDoesNotMatch error while backing up your application. This error occurs because some backup storage locations still use the older versions of the S3 APIs, which are incompatible with the newer AWS SDK for Go V2. To resolve this issue, you can use the legacy-aws Velero plugin in the DataProtectionApplication custom resource (CR). The legacy-aws Velero plugin uses the older AWS SDK for Go V1, which is compatible with the legacy S3 APIs, ensuring successful backups.
Using the legacy-aws Velero plugin in the DataProtectionApplication CR
In the following use case, you configure the DataProtectionApplication CR with the legacy-aws Velero plugin and then back up an application.
Depending on the backup storage location you choose, you can use either the legacy-aws or the aws plugin in your DataProtectionApplication CR. If you use both of the plugins in the DataProtectionApplication CR, the following error occurs: aws and legacy-aws can not be both specified in DPA spec.configuration.velero.defaultPlugins.
Prerequisites
- You have installed the OADP Operator.
- You have configured an AWS S3-compatible object storage as a backup location.
- You have an application with a database running in a separate namespace.
Procedure
-
Configure the
DataProtectionApplicationCR to use thelegacy-awsVelero plugin as shown in the following example:apiVersion: oadp.openshift.io/v1alpha1kind: DataProtectionApplicationmetadata:name: oadp-backupnamespace: openshift-adpspec:configuration:nodeAgent:enable: trueuploaderType: kopiavelero:defaultPlugins:- legacy-aws- openshift- csidefaultSnapshotMoveData: truebackupLocations:- velero:config:profile: "default"region: noobaas3Url: https://s3.openshift-storage.svcs3ForcePathStyle: "true"insecureSkipTLSVerify: "true"provider: awsdefault: truecredential:key: cloudname: cloud-credentialsobjectStorage:bucket: <bucket_name>prefix: oadpwhere:
legacy-aws- Specifies to use the
legacy-awsplugin. <bucket_name>- Specifies the bucket name.
-
Create the
DataProtectionApplicationCR by running the following command:$ oc apply -f <dpa_filename> -
Verify that the
DataProtectionApplicationCR is created successfully by running the following command. In the example output, you can see thestatusobject has thetypefield set toReconciledand thestatusfield set to"True". That status indicates that theDataProtectionApplicationCR is successfully created.$ oc get dpa -o yamlExample outputapiVersion: v1items:- apiVersion: oadp.openshift.io/v1alpha1kind: DataProtectionApplicationmetadata:namespace: openshift-adp#...#spec:backupLocations:- velero:config:#...#status:conditions:- lastTransitionTime: "20....9:54:02Z"message: Reconcile completereason: Completestatus: "True"type: Reconciledkind: Listmetadata:resourceVersion: "" -
Verify that the backup storage location (BSL) is available by running the following command:
$ oc get backupstoragelocations.velero.io -n openshift-adpYou should see an output similar to the following example:
NAME PHASE LAST VALIDATED AGE DEFAULTdpa-sample-1 Available 3s 15s true -
Configure a
BackupCR as shown in the following example:apiVersion: velero.io/v1kind: Backupmetadata:name: test-backupnamespace: openshift-adpspec:includedNamespaces:- <application_namespace>where:
<application_namespace>- Specifies the namespace for the application to back up.
-
Create the
BackupCR by running the following command:$ oc apply -f <backup_cr_filename>
Verification
-
Verify that the backup object is in the
Completedphase by running the following command. For more details, see the example output.$ oc describe backups.velero.io test-backup -n openshift-adpExample outputName: test-backupNamespace: openshift-adp# ....#Status:Backup Item Operations Attempted: 1Backup Item Operations Completed: 1Completion Timestamp: 2024-09-25T10:17:01ZExpiration: 2024-10-25T10:16:31ZFormat Version: 1.1.0Hook Status:Phase: CompletedProgress:Items Backed Up: 34Total Items: 34Start Timestamp: 2024-09-25T10:16:31ZVersion: 1Events: <none>