Skip to content

Commit 6f8fdc1

Browse files
committed
Add use case for legacy-aws plugin
Signed-off-by: Shruti Deshpande <shdeshpa@redhat.com>
1 parent 68e8107 commit 6f8fdc1

File tree

3 files changed

+190
-0
lines changed

3 files changed

+190
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3493,6 +3493,8 @@ Topics:
34933493
File: oadp-usecase-restore-different-namespace
34943494
- Name: Including a self-signed CA certificate during backup
34953495
File: oadp-usecase-enable-ca-cert
3496+
- Name: Using the legacy-aws Velero plugin
3497+
File: oadp-usecase-legacy-aws-plugin
34963498
- Name: Installing and configuring OADP
34973499
Dir: installing
34983500
Topics:
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="oadp-using-legacy-aws-plugin"]
3+
= Using the legacy-aws Velero plugin
4+
include::_attributes/common-attributes.adoc[]
5+
:context: oadp-using-legacy-aws-plugin
6+
7+
toc::[]
8+
9+
If you are using an {aws-short} 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.
10+
11+
// using legacy-aws velero plugin
12+
include::modules/oadp-using-legacy-aws-plugin.adoc[leveloffset=+1]
Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * backup_and_restore/application_backup_and_restore/oadp-use-cases/oadp-usecase-legacy-aws-plugin.adoc
4+
5+
6+
:_mod-docs-content-type: PROCEDURE
7+
[id="oadp-using-legacy-aws-plugin_{context}"]
8+
= Using the legacy-aws Velero plugin in the DataProtectionApplication CR
9+
10+
In the following use case, you configure the `DataProtectionApplication` CR with the `legacy-aws` Velero plugin and then back up an application.
11+
12+
[NOTE]
13+
====
14+
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`.
15+
====
16+
17+
.Prerequisites
18+
19+
* You have installed the {oadp-short} Operator.
20+
* You have configured an {aws-short} S3-compatible object storage as a backup location.
21+
* You have an application with a database running in a separate namespace.
22+
23+
.Procedure
24+
25+
. Configure the `DataProtectionApplication` CR to use the `legacy-aws` Velero plugin as shown in the following example:
26+
+
27+
.Example `DataProtectionApplication` CR
28+
[source,yaml]
29+
----
30+
apiVersion: oadp.openshift.io/v1alpha1
31+
kind: DataProtectionApplication
32+
metadata:
33+
name: oadp-backup
34+
namespace: openshift-adp
35+
spec:
36+
configuration:
37+
nodeAgent:
38+
enable: true
39+
uploaderType: kopia
40+
velero:
41+
defaultPlugins:
42+
- legacy-aws # <1>
43+
- openshift
44+
- csi
45+
defaultSnapshotMoveData: true
46+
backupLocations:
47+
- velero:
48+
config:
49+
profile: "default"
50+
region: noobaa
51+
s3Url: https://s3.openshift-storage.svc
52+
s3ForcePathStyle: "true"
53+
insecureSkipTLSVerify: "true"
54+
provider: aws
55+
default: true
56+
credential:
57+
key: cloud
58+
name: cloud-credentials
59+
objectStorage:
60+
bucket: <bucket_name> # <2>
61+
prefix: oadp
62+
----
63+
<1> Use the `legacy-aws` plugin.
64+
<2> Specify the bucket name.
65+
66+
. Create the `DataProtectionApplication` CR by running the following command:
67+
+
68+
[source,terminal]
69+
----
70+
$ oc apply -f <dpa_filename>
71+
----
72+
73+
. Verify that the `DataProtectionApplication` CR is created successfully by running the following command. In the example output, you can see the `status` object has the `type` field set to `Reconciled` and the `status` field set to `"True"`. That status indicates that the `DataProtectionApplication` CR is successfully created.
74+
+
75+
[source,terminal]
76+
----
77+
$ oc get dpa -o yaml
78+
----
79+
+
80+
.Example output
81+
+
82+
[source,yaml]
83+
----
84+
apiVersion: v1
85+
items:
86+
- apiVersion: oadp.openshift.io/v1alpha1
87+
kind: DataProtectionApplication
88+
metadata:
89+
namespace: openshift-adp
90+
#...#
91+
spec:
92+
backupLocations:
93+
- velero:
94+
config:
95+
#...#
96+
status:
97+
conditions:
98+
- lastTransitionTime: "20....9:54:02Z"
99+
message: Reconcile complete
100+
reason: Complete
101+
status: "True"
102+
type: Reconciled
103+
kind: List
104+
metadata:
105+
resourceVersion: ""
106+
----
107+
108+
. Verify that the backup storage location (BSL) is available by running the following command:
109+
+
110+
[source,terminal]
111+
----
112+
$ oc get backupstoragelocations.velero.io -n openshift-adp
113+
----
114+
+
115+
.Example output
116+
[source,terminal]
117+
----
118+
NAME PHASE LAST VALIDATED AGE DEFAULT
119+
dpa-sample-1 Available 3s 15s true
120+
----
121+
122+
. Configure a `Backup` CR as shown in the following example:
123+
+
124+
.Example backup CR
125+
[source,yaml]
126+
----
127+
apiVersion: velero.io/v1
128+
kind: Backup
129+
metadata:
130+
name: test-backup
131+
namespace: openshift-adp
132+
spec:
133+
includedNamespaces:
134+
- <application_namespace> # <1>
135+
----
136+
<1> Specify the namespace for the application to back up.
137+
138+
. Create the `Backup` CR by running the following command:
139+
+
140+
[source,terminal]
141+
----
142+
$ oc apply -f <backup_cr_filename>
143+
----
144+
145+
.Verification
146+
147+
* Verify that the backup object is in the `Completed` phase by running the following command. For more details, see the example output.
148+
+
149+
[source,terminal]
150+
----
151+
$ oc describe backups.velero.io test-backup -n openshift-adp
152+
----
153+
+
154+
.Example output
155+
[source,terminal]
156+
----
157+
Name: test-backup
158+
Namespace: openshift-adp
159+
# ....#
160+
Status:
161+
Backup Item Operations Attempted: 1
162+
Backup Item Operations Completed: 1
163+
Completion Timestamp: 2024-09-25T10:17:01Z
164+
Expiration: 2024-10-25T10:16:31Z
165+
Format Version: 1.1.0
166+
Hook Status:
167+
Phase: Completed
168+
Progress:
169+
Items Backed Up: 34
170+
Total Items: 34
171+
Start Timestamp: 2024-09-25T10:16:31Z
172+
Version: 1
173+
Events: <none>
174+
----
175+
176+

0 commit comments

Comments
 (0)