You can configure the DataProtectionApplication
(DPA) custom resource (CR) with more than one BackupStorageLocation
(BSL) CR and specify the credentials provided by the cloud provider.
For example, where you have configured the following two BSLs:
As you have already set the BSL created through the DPA as the default, you cannot set the independently created BSL again as the default. This means, at any given time, you can set only one BSL as the default BSL.
Procedure
-
Configure the DataProtectionApplication
CR with more than one BackupStorageLocation
CR. See the following example:
Example DPA
apiVersion: oadp.openshift.io/v1alpha1
kind: DataProtectionApplication
#...
backupLocations:
- name: aws (1)
velero:
provider: aws
default: true (2)
objectStorage:
bucket: <bucket_name> (3)
prefix: <prefix> (4)
config:
region: <region_name> (5)
profile: "default"
credential:
key: cloud
name: cloud-credentials (6)
- name: odf (7)
velero:
provider: aws
default: false
objectStorage:
bucket: <bucket_name>
prefix: <prefix>
config:
profile: "default"
region: <region_name>
s3Url: <url> (8)
insecureSkipTLSVerify: "true"
s3ForcePathStyle: "true"
credential:
key: cloud
name: <custom_secret_name_odf> (9)
#...
1 |
Specify a name for the first BSL. |
2 |
This parameter indicates that this BSL is the default BSL. If a BSL is not set in the Backup CR , the default BSL is used. You can set only one BSL as the default. |
3 |
Specify the bucket name. |
4 |
Specify a prefix for Velero backups; for example, velero . |
5 |
Specify the AWS region for the bucket. |
6 |
Specify the name of the default Secret object that you created. |
7 |
Specify a name for the second BSL. |
8 |
Specify the URL of the S3 endpoint. |
9 |
Specify the correct name for the Secret ; for example, custom_secret_name_odf . If you do not specify a Secret name, the default name is used. |
-
Specify the BSL to be used in the backup CR. See the following example.
Example backup CR
apiVersion: velero.io/v1
kind: Backup
# ...
spec:
includedNamespaces:
- <namespace> (1)
storageLocation: <backup_storage_location> (2)
defaultVolumesToFsBackup: true
1 |
Specify the namespace to back up. |
2 |
Specify the storage location. |