Backup repository
The backup repository stores application and configuration data (for example, namespaces and applications) and enables rapid restoration from backup files. Each backup repository is a Velero BackupStorageLocation (BSL) in the cpaas-system namespace of the cluster where you back up or restore applications.
The Backup Repository Management tab is deprecated. It is still supported, but it will be removed in a future release and is not recommended for new deployments. Create a BSL directly in the target cluster, as described in this topic.
TOC
PrerequisitesCreate a backup repositoryDelete a backup repositoryManage backup repositories on the web console (deprecated)Create a backup repository on the web consoleDelete a backup repository on the web consolePrerequisites
- Data Backup is installed on the target cluster. For installation instructions, see application installation.
- You have
kubectlaccess to the target cluster with permissions to create Secrets and BackupStorageLocations in thecpaas-systemnamespace. - An S3-compatible object storage bucket is available, together with its access keys.
Create a backup repository
Run the following steps on the cluster where you want to back up or restore applications. To use the same repository on several clusters, repeat the steps on each cluster.
-
Create a Secret that stores the access keys of the object storage.
-
Create a BackupStorageLocation that references the Secret. Save the following YAML to a file, and then run
kubectl apply -f <file>.WARNINGThe
cpaas.io/backup-storage-location-repolabel is required, and its value must be the name of the BSL. Without this label, the platform treats the BSL as a legacy repository and synchronizes it to all clusters that have Data Backup installed. The label value is also displayed as the repository name when you select a backup repository on the Backup and Recovery page. -
Verify that the backup repository is available.
The repository is ready when
PHASEisAvailable. Only available repositories can be selected when you create backup schedules or recovery tasks. IfPHASEisUnavailable, check the Velero logs:
Delete a backup repository
If a backup schedule references the repository, deleting it will cause backup failures when the schedule runs. Update the backup schedule to reference another repository before deletion.
Deleting a backup repository does not delete the backup data in the object storage.
The following commands apply only to backup repositories created as described in this topic. Delete backup repositories that were created on the web console, including repositories migrated from earlier versions, on the web console. Otherwise, the platform re-creates them. For instructions, see Delete a backup repository on the web console.
Manage backup repositories on the web console (deprecated)
This feature is deprecated. It is still supported, but it will be removed in a future release and is not recommended for new deployments. Use the procedures above instead.
Backup repositories created on the web console are synchronized to all clusters that have Data Backup installed.
Create a backup repository on the web console
-
In the left navigation, click Clusters > Backup and Recovery.
-
Switch to the Backup Repository Management tab.
-
Click Create Backup Repository and configure the parameters as follows.
-
Click Create.
Delete a backup repository on the web console
-
In the left navigation, click Clusters > Backup and Recovery.
-
Switch to the Backup Repository Management tab.
-
Click the Delete button on the right of the backup repository, and then click Delete to confirm the deletion.