You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarify backup vs restore: full backup, selective restore with labels
Update design to reflect the actual approach:
- Backup: Full namespace backup (everything, optionally exclude PVCs)
- Restore: Selective restore using webhook-added labels
- Annotations: All prefixed with openstack.org/backup-
Key changes:
- openstack.org/backup → openstack.org/backup-restore
- openstack.org/restore-order → openstack.org/backup-restore-order
- Full namespace backup (no label selector)
- Selective restore (uses labels added by webhooks)
Rationale:
- Backup everything to ensure complete snapshot
- Use webhooks to label resources needing restore
- CRD annotations declare restore behavior (not backup)
- OADP restore filters by labels for selective recovery
Example:
Backup: Everything in namespace
Restore Order 1: Only resources with labels:
- openstack.org/backup-restore: "true"
- openstack.org/backup-restore-order: "1"
This makes the distinction clear: backup is comprehensive, restore
is selective based on webhook-added labels.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
One OADP Backup CR captures **everything** in the namespace (complete snapshot):
174
175
175
176
```yaml
176
177
apiVersion: velero.io/v1
@@ -181,18 +182,34 @@ metadata:
181
182
spec:
182
183
includedNamespaces:
183
184
- openstack
184
-
labelSelector:
185
-
matchLabels:
186
-
openstack.org/backup: "true"
187
-
snapshotVolumes: true
185
+
# NO labelSelector - backup everything
186
+
snapshotVolumes: true # Backup PVCs with CSI snapshots
188
187
defaultVolumesToFsBackup: false
189
188
storageLocation: velero-1
190
189
ttl: 720h
191
190
```
192
191
193
-
#### Multiple Restores (By Order)
192
+
**Optional: Exclude large PVC data** (if storage is limited):
194
193
195
-
Multiple OADP Restore CRs, one per restore order:
194
+
```yaml
195
+
apiVersion: velero.io/v1
196
+
kind: Backup
197
+
metadata:
198
+
name: openstack-backup-20260303-120000
199
+
namespace: openshift-adp
200
+
spec:
201
+
includedNamespaces:
202
+
- openstack
203
+
# Backup all CRs, Secrets, ConfigMaps, but exclude PVC data
204
+
snapshotVolumes: false # Skip PVC snapshots to reduce backup size
205
+
defaultVolumesToFsBackup: false
206
+
storageLocation: velero-1
207
+
ttl: 720h
208
+
```
209
+
210
+
#### Selective Restore (By Order)
211
+
212
+
Multiple OADP Restore CRs, one per restore order, using labels added by webhooks:
196
213
197
214
```yaml
198
215
# Restore Order 1: Secrets, ConfigMaps, NADs
@@ -205,9 +222,9 @@ spec:
205
222
backupName: openstack-backup-20260303-120000
206
223
labelSelector:
207
224
matchLabels:
208
-
openstack.org/backup: "true"
209
-
openstack.org/restore-order: "1"
210
-
restorePVs: false
225
+
openstack.org/backup-restore: "true"
226
+
openstack.org/backup-restore-order: "1"
227
+
restorePVs: false # Don't restore PVCs in this order
211
228
---
212
229
# Restore Order 2: TLS Issuers
213
230
apiVersion: velero.io/v1
@@ -219,13 +236,15 @@ spec:
219
236
backupName: openstack-backup-20260303-120000
220
237
labelSelector:
221
238
matchLabels:
222
-
openstack.org/backup: "true"
223
-
openstack.org/restore-order: "2"
239
+
openstack.org/backup-restore: "true"
240
+
openstack.org/backup-restore-order: "2"
224
241
restorePVs: false
225
242
---
226
243
# And so on for each restore order...
227
244
```
228
245
246
+
**Key Point**: Webhooks add `openstack.org/backup-restore: "true"` labels to resources that need restore. OADP restore uses these labels for selective restore, even though the backup contains everything.
247
+
229
248
## Restore Order
230
249
231
250
The restore sequence is critical for maintaining dependencies between resources.
@@ -253,8 +272,8 @@ The restore sequence is critical for maintaining dependencies between resources.
253
272
254
273
### Core Operator CRDs
255
274
256
-
| CRD | Backup | Category | Order | Notes |
257
-
|-----|--------|----------|-------|-------|
275
+
| CRD | Restore | Category | Order | Notes |
276
+
|-----|---------|----------|-------|-------|
258
277
| OpenStackControlPlane | true | controlplane | 6 | Main control plane CR |
0 commit comments