Configure the DataProtectionApplication (DPA) custom resource (CR) with multiple BackupStorageLocation (BSL) resources to store backups across different locations using provider-specific credentials. This provides backup distribution and location-specific restore capabilities.
For example, 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
velero:
provider: aws
default: true
objectStorage:
bucket: <bucket_name>
prefix: <prefix>
config:
region: <region_name>
profile: "default"
credential:
key: cloud
name: cloud-credentials
- name: odf
velero:
provider: aws
default: false
objectStorage:
bucket: <bucket_name>
prefix: <prefix>
config:
profile: "default"
region: <region_name>
s3Url: <url>
insecureSkipTLSVerify: "true"
s3ForcePathStyle: "true"
credential:
key: cloud
name: <custom_secret_name_odf>
#...
name: aws
-
Specifies a name for the first BSL.
default: true
-
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.
<bucket_name>
-
Specifies the bucket name.
<prefix>
-
Specifies a prefix for Velero backups. For example, velero.
<region_name>
-
Specifies the AWS region for the bucket.
cloud-credentials
-
Specifies the name of the default Secret object that you created.
name: odf
-
Specifies a name for the second BSL.
<url>
-
Specifies the URL of the S3 endpoint.
<custom_secret_name_odf>
-
Specifies 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>
storageLocation: <backup_storage_location>
defaultVolumesToFsBackup: true
<namespace>
-
Specifies the namespace to back up.
<backup_storage_location>
-
Specifies the storage location.