I’m looking into using Openshift with OADP (OpenShift API for Data Protection) for making backups to Azure S3 storage. This seems to work but when removing the backup
velero backup delete my-backup
this will only remove the manifests but the volume snapshots will still reside on the Azure container
Our backup manifest is as follows:
kind: Backup
apiVersion: velero.io/v1
metadata:
name: my-backup
namespace: openshift-adp
spec:
csiSnapshotTimeout: 10m0s
defaultVolumesToFsBackup: true
includedNamespaces:
- my-namespace
itemOperationTimeout: 4h0m0s
snapshotMoveData: true
storageLocation: my-azure-location
ttl: 720h0m0s
volumeSnapshotLocations:
- velero-sample-1
Any help is welcome.
Did try to make a backup and removing it. I do see the manifests are being removed
2
As explained in comments, Velero only removes the manifests but not the volume snapshots. If you want to ensure volume snapshots are deleted when a backup is removed make sure that the VolumeSnapshotClass
you are using has the correct deletionPolicy
. If the policy is set to Retain
, the volume snapshots will remain even after deleting the backup. Ensure that the VolumeSnapshotClass
has deletionPolicy
set to Delete
.
kubectl get volumesnapshotclass -o yaml
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: azure-snapclass
driver: disk.csi.azure.com
deletionPolicy: Delete
Example-
I have my velero installed-
Listed out my backup
ensured that my deletion policy is set to Delete
both the backup and volume snapshots are deleted