-
Bug
-
Resolution: Unresolved
-
Normal
-
OADP 1.4.0, OADP 1.4.1
-
4
-
False
-
-
False
-
ToDo
-
-
-
Important
-
8
-
2.000
-
Very Likely
-
0
-
None
-
Unset
-
Unknown
-
None
With OADP 1.4 it should be possible to do a namespace backup based on label assigned to the namespace:
- https://github.com/vmware-tanzu/velero/pull/7697
- https://redhat-internal.slack.com/archives/C0144ECKUJ0/p1719845346832879
- https://redhat-internal.slack.com/archives/C0144ECKUJ0/p1721044998202359
When we are saying 'namespace backup' we mean backup of the namespace content. Similarly as it works when using spec.includedNamespaces .
But the result is that only the project and namespace objects are being backed up.
# oc label namespace backuptest ns=roman
kind: Backup apiVersion: velero.io/v1 metadata: name: backup-ns2 namespace: openshift-adp spec: volumeSnapshotLocations: - velero-sample-1 defaultVolumesToFsBackup: true csiSnapshotTimeout: 10m0s ttl: 720h0m0s itemOperationTimeout: 4h0m0s storageLocation: velero-sample-1 hooks: {} labelSelector: matchLabels: ns: roman snapshotMoveData: false
$ velero describe backup backup-ns2 -n openshift-adp --details Name: backup-ns2 [...] Started: 2024-07-23 09:27:58 +0200 CEST Completed: 2024-07-23 09:28:02 +0200 CEST Expiration: 2024-08-22 09:27:58 +0200 CEST Total items to be backed up: 2 Items backed up: 2 Resource List: project.openshift.io/v1/Project: - backuptest v1/Namespace: - backuptest [...]
When doing a backup of the same namespace but based on spec.includedNamespaces we are getting the complete backup:
$ velero describe backup backup-ns1 -n openshift-adp --details Name: backup-ns1 [...] Started: 2024-07-23 09:17:23 +0200 CEST Completed: 2024-07-23 09:17:26 +0200 CEST Expiration: 2024-08-22 09:17:23 +0200 CEST Total items to be backed up: 23 Items backed up: 23 Resource List: authorization.openshift.io/v1/RoleBinding: - backuptest/admin - backuptest/system:deployers - backuptest/system:image-builders - backuptest/system:image-pullers rbac.authorization.k8s.io/v1/RoleBinding: - backuptest/admin - backuptest/system:deployers - backuptest/system:image-builders - backuptest/system:image-pullers v1/ConfigMap: - backuptest/kube-root-ca.crt - backuptest/openshift-service-ca.crt v1/Namespace: - backuptest v1/PersistentVolume: - pvc-572c76bd-25e8-41d6-a871-f7ef0da71720 v1/PersistentVolumeClaim: - backuptest/sample-app-pvc v1/Pod: - backuptest/roman-sample-app v1/Secret: - backuptest/builder-dockercfg-wqzv6 - backuptest/builder-token-4p8mh - backuptest/default-dockercfg-sx5qw - backuptest/default-token-b6slt - backuptest/deployer-dockercfg-q844m - backuptest/deployer-token-6f84z v1/ServiceAccount: - backuptest/builder - backuptest/default - backuptest/deployer [...]