Skip to content

Commit f349d98

Browse files
stuggiclaude
andcommitted
Move alternative approaches to separate document
Split static reference content about alternative backup approaches into its own document to keep the main doc focused on the primary tested procedure. Changes: - Created backup-restore-ctlplane-alternatives.md (77 lines) - Moved "Alternative Approaches & Ideas" section (must-gather approach) - Added reference link in main doc - Added alternatives doc to README table - Main doc reduced from 1,658 to 1,593 lines Document structure now: - backup-restore-ctlplane.md: Main tested procedure (1,593 lines) - backup-restore-ctlplane-experimental.md: Untested scenarios (501 lines) - backup-restore-ctlplane-troubleshooting.md: Common issues (263 lines) - backup-restore-ctlplane-alternatives.md: Other approaches (77 lines) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 3393525 commit f349d98

3 files changed

Lines changed: 80 additions & 67 deletions

File tree

docs/dev/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ For a complete OpenStack backup and restore:
1616
| [backup-restore-ctlplane.md](backup-restore-ctlplane.md) | **ControlPlane** backup/restore - OpenStackControlPlane CR, secrets, configmaps |
1717
| [backup-restore-dataplane.md](backup-restore-dataplane.md) | **DataPlane** backup/restore - Compute nodes (NodeSets), network configuration (NetConfig), IP allocations |
1818
| [backup-restore-ctlplane-troubleshooting.md](backup-restore-ctlplane-troubleshooting.md) | **Troubleshooting** - Common issues and solutions for backup/restore |
19+
| [backup-restore-ctlplane-alternatives.md](backup-restore-ctlplane-alternatives.md) | **Alternative Approaches** - Other backup methods (e.g., must-gather) |
1920

2021
## Ansible Playbooks
2122

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# OpenStack Control Plane Backup and Restore - Alternative Approaches
2+
3+
This document contains alternative approaches and ideas for backup/restore that were considered but not adopted as the primary method.
4+
5+
For the main tested backup/restore procedure, see [backup-restore-ctlplane.md](backup-restore-ctlplane.md).
6+
7+
---
8+
9+
## Alternative Approaches & Ideas
10+
11+
### Using must-gather for Comprehensive Backup
12+
13+
The [openstack-must-gather](https://github.com/openstack-k8s-operators/openstack-must-gather) tool provides a comprehensive alternative for backing up the OpenStack control plane.
14+
15+
**What must-gather captures:**
16+
- All Custom Resources (OpenStackControlPlane, OpenStackVersion, and all operator-created service CRs)
17+
- All ConfigMaps and Secrets (including service configs)
18+
- Operator information (CSVs, Subscriptions, InstallPlans, OperatorGroups)
19+
- Pod logs, events, and status
20+
- Network configuration (NetworkAttachmentDefinitions, etc.)
21+
- DataPlane resources (NetConfig, IPSets, DataPlaneNodeSets, etc.)
22+
- Optional: Database dumps (via `OPENSTACK_DATABASES` environment variable)
23+
- Optional: SOS reports from OpenShift nodes and EDPM nodes
24+
25+
**Usage for backup:**
26+
27+
```bash
28+
# Standard must-gather (secrets are MASKED by default - not suitable for restore)
29+
oc adm must-gather --image=quay.io/openstack-k8s-operators/openstack-must-gather
30+
31+
# For backup/restore purposes: Capture unmasked secrets
32+
oc adm must-gather \
33+
--image=quay.io/openstack-k8s-operators/openstack-must-gather \
34+
-- DO_NOT_MASK=1 gather
35+
36+
# The output will be in must-gather.local.<timestamp>/ directory
37+
```
38+
39+
**Benefits:**
40+
- **Single command** captures everything comprehensively
41+
- **Standard tool** - already used for OpenStack troubleshooting and support cases
42+
- **Includes all sub-CRs** - useful for debugging and comparison even if not needed for restore
43+
- **Well-maintained** - kept up to date with operator changes
44+
- **Structured output** - organized by namespace and resource type
45+
46+
**Considerations:**
47+
- **DO_NOT_MASK=1 is required** - By default, must-gather masks secrets for security. For backup/restore, you need unmasked secrets.
48+
- **Security warning** - The backup will contain unmasked credentials. Store securely.
49+
- **Large archive size** - Includes logs and additional diagnostic data beyond what's needed for restore
50+
- **Extraction needed** - Would need to extract specific resources from the must-gather archive for restore
51+
52+
**Potential workflow:**
53+
54+
1. **Backup**: Use must-gather with `DO_NOT_MASK=1` to capture complete state
55+
2. **Extract for restore**: Extract only the essential resources from the archive:
56+
- `namespaces/openstack/crs/openstackcontrolplanes.core.openstack.org/`
57+
- `namespaces/openstack/crs/openstackversions.core.openstack.org/`
58+
- `namespaces/openstack/crs/netconfigs.network.openstack.org/`
59+
- `namespaces/openstack/secrets/` (filter for essential secrets)
60+
- `csv/`, `subscriptions/`, `installplans/` (for operator version info)
61+
3. **Restore**: Apply extracted resources using the manual restore procedure
62+
63+
**Why this approach is not the default in this document:**
64+
65+
- The manual backup procedure is **minimal and focused** on only what's needed for restore
66+
- must-gather is primarily designed for **diagnostics and troubleshooting**, not backup/restore
67+
- Extracting specific resources from must-gather output requires additional processing
68+
- The manual approach gives explicit control over what's backed up and restored
69+
70+
**Future consideration:**
71+
72+
As the backup/restore workflow matures, a dedicated script could be developed to:
73+
- Extract the essential resources from must-gather output
74+
- Strip ownerReferences and runtime metadata
75+
- Organize them into a restore-ready format
76+
- This would combine the comprehensiveness of must-gather with the simplicity of the manual restore procedure
77+

docs/dev/backup-restore-ctlplane.md

Lines changed: 2 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1572,74 +1572,9 @@ For troubleshooting common issues during backup and restore, see [backup-restore
15721572

15731573
---
15741574

1575-
## Alternative Approaches & Ideas
1575+
## Alternative Approaches
15761576

1577-
### Using must-gather for Comprehensive Backup
1578-
1579-
The [openstack-must-gather](https://github.com/openstack-k8s-operators/openstack-must-gather) tool provides a comprehensive alternative for backing up the OpenStack control plane.
1580-
1581-
**What must-gather captures:**
1582-
- All Custom Resources (OpenStackControlPlane, OpenStackVersion, and all operator-created service CRs)
1583-
- All ConfigMaps and Secrets (including service configs)
1584-
- Operator information (CSVs, Subscriptions, InstallPlans, OperatorGroups)
1585-
- Pod logs, events, and status
1586-
- Network configuration (NetworkAttachmentDefinitions, etc.)
1587-
- DataPlane resources (NetConfig, IPSets, DataPlaneNodeSets, etc.)
1588-
- Optional: Database dumps (via `OPENSTACK_DATABASES` environment variable)
1589-
- Optional: SOS reports from OpenShift nodes and EDPM nodes
1590-
1591-
**Usage for backup:**
1592-
1593-
```bash
1594-
# Standard must-gather (secrets are MASKED by default - not suitable for restore)
1595-
oc adm must-gather --image=quay.io/openstack-k8s-operators/openstack-must-gather
1596-
1597-
# For backup/restore purposes: Capture unmasked secrets
1598-
oc adm must-gather \
1599-
--image=quay.io/openstack-k8s-operators/openstack-must-gather \
1600-
-- DO_NOT_MASK=1 gather
1601-
1602-
# The output will be in must-gather.local.<timestamp>/ directory
1603-
```
1604-
1605-
**Benefits:**
1606-
- **Single command** captures everything comprehensively
1607-
- **Standard tool** - already used for OpenStack troubleshooting and support cases
1608-
- **Includes all sub-CRs** - useful for debugging and comparison even if not needed for restore
1609-
- **Well-maintained** - kept up to date with operator changes
1610-
- **Structured output** - organized by namespace and resource type
1611-
1612-
**Considerations:**
1613-
- **DO_NOT_MASK=1 is required** - By default, must-gather masks secrets for security. For backup/restore, you need unmasked secrets.
1614-
- **Security warning** - The backup will contain unmasked credentials. Store securely.
1615-
- **Large archive size** - Includes logs and additional diagnostic data beyond what's needed for restore
1616-
- **Extraction needed** - Would need to extract specific resources from the must-gather archive for restore
1617-
1618-
**Potential workflow:**
1619-
1620-
1. **Backup**: Use must-gather with `DO_NOT_MASK=1` to capture complete state
1621-
2. **Extract for restore**: Extract only the essential resources from the archive:
1622-
- `namespaces/openstack/crs/openstackcontrolplanes.core.openstack.org/`
1623-
- `namespaces/openstack/crs/openstackversions.core.openstack.org/`
1624-
- `namespaces/openstack/crs/netconfigs.network.openstack.org/`
1625-
- `namespaces/openstack/secrets/` (filter for essential secrets)
1626-
- `csv/`, `subscriptions/`, `installplans/` (for operator version info)
1627-
3. **Restore**: Apply extracted resources using the manual restore procedure
1628-
1629-
**Why this approach is not the default in this document:**
1630-
1631-
- The manual backup procedure is **minimal and focused** on only what's needed for restore
1632-
- must-gather is primarily designed for **diagnostics and troubleshooting**, not backup/restore
1633-
- Extracting specific resources from must-gather output requires additional processing
1634-
- The manual approach gives explicit control over what's backed up and restored
1635-
1636-
**Future consideration:**
1637-
1638-
As the backup/restore workflow matures, a dedicated script could be developed to:
1639-
- Extract the essential resources from must-gather output
1640-
- Strip ownerReferences and runtime metadata
1641-
- Organize them into a restore-ready format
1642-
- This would combine the comprehensiveness of must-gather with the simplicity of the manual restore procedure
1577+
For alternative backup/restore approaches (e.g., using must-gather), see [backup-restore-ctlplane-alternatives.md](backup-restore-ctlplane-alternatives.md).
16431578

16441579
---
16451580

0 commit comments

Comments
 (0)