Skip to content

Commit

Permalink
exclude PV and PVC in velero backups
Browse files Browse the repository at this point in the history
Signed-off-by: rakeshgm <[email protected]>
  • Loading branch information
rakeshgm authored and ShyamsundarR committed Sep 12, 2024
1 parent b8f5aee commit 9b1872b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/krp.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ The VRG enables Kubernetes resources to be captured(backed up) and recovered as
part of disaster protection. This is accomplished through the
kubeObjectProtection section of the VRG spec. If kubeObjectProtection is not
included in a VRG, then Kubernetes resources are not protected as part of the
VRG disaster protection.
VRG disaster protection. PVCs and PVs are protected by Ramen and all resources
are protected and backed by kubeObjectProtection.
The kubeObjectProtection section contains two sub-sections, captureOrder and
recoverOrder. This captureOrder section provides instructions on how to backup
Expand Down
3 changes: 2 additions & 1 deletion internal/controller/kubeobjects/velero/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,8 @@ func getBackupSpecFromObjectsSpec(objectsSpec kubeobjects.Spec) velero.BackupSpe
IncludedResources: objectsSpec.IncludedResources,
// exclude VRs from Backup so VRG can create them: see https://github.com/RamenDR/ramen/issues/884
ExcludedResources: append(objectsSpec.ExcludedResources, "volumereplications.replication.storage.openshift.io",
"replicationsources.volsync.backube", "replicationdestinations.volsync.backube"),
"replicationsources.volsync.backube", "replicationdestinations.volsync.backube",
"PersistentVolumeClaims", "PersistentVolumes"),
LabelSelector: objectsSpec.LabelSelector,
OrLabelSelectors: objectsSpec.OrLabelSelectors,
TTL: metav1.Duration{}, // TODO: set default here
Expand Down

0 comments on commit 9b1872b

Please sign in to comment.