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
feat: add pgAdmin backup alternative to PostgreSQL migration guide
- Add Step 2b with pgAdmin GUI-based backup as alternative to pg_dumpall
- Update prerequisites to clarify kubectl exec requirement and note pgAdmin option
- Update overview to mention both backup methods
- Addresses accessibility for ArgoCD-managed environments without direct kubectl exec access
Copy file name to clipboardExpand all lines: migration-guides/GENERIC_POSTGRESQL_MIGRATION_GUIDE.md
+82-2Lines changed: 82 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ This guide provides a generic, reusable procedure for migrating PostgreSQL deplo
12
12
13
13
### What This Guide Covers
14
14
15
-
- Full database backup using `pg_dumpall`
15
+
- Full database backup using `pg_dumpall` (CLI) or pgAdmin (GUI alternative)
16
16
- Safe uninstallation of Bitnami PostgreSQL
17
17
- Installation of CloudPirates PostgreSQL
18
18
- Data restoration with integrity verification
@@ -31,12 +31,14 @@ This guide provides a generic, reusable procedure for migrating PostgreSQL deplo
31
31
32
32
## Prerequisites
33
33
34
-
- Kubernetes cluster access with `kubectl`
34
+
- Kubernetes cluster access with `kubectl` (the `pg_dumpall` method in Step 2 requires `kubectl exec` / RBAC `pods/exec` permissions)
35
35
- Helm 3.x installed
36
36
- Maintenance window scheduled
37
37
- Sufficient local disk space for database backup (2-3x database size recommended)
38
38
- Access to modify Helm chart files (Chart.yaml, values.yaml)
39
39
40
+
> 💡 **No `kubectl exec` access?** If your environment is managed exclusively through ArgoCD or you lack direct cluster shell access, use the [pgAdmin alternative (Step 2b)](#step-2b-alternative-backup-database-using-pgadmin) instead of `pg_dumpall`.
41
+
40
42
---
41
43
42
44
## Configuration Variables
@@ -126,6 +128,84 @@ ls -lh ${BACKUP_FILE}
126
128
127
129
---
128
130
131
+
### Step 2b (Alternative): Backup Database Using pgAdmin
132
+
133
+
If you do not have `kubectl exec` access (e.g., environments managed exclusively via ArgoCD), you can use **pgAdmin** to create the backup through a web UI instead.
134
+
135
+
> 💡 **Tip**: If your Helm chart already deploys pgAdmin as a subchart (e.g., `pgadmin4.enabled: true`), you can use that instance directly — it already has network access to the PostgreSQL service within the cluster.
136
+
>
137
+
> Example subchart configuration:
138
+
> ```yaml
139
+
> pgadmin4:
140
+
> enabled: true
141
+
> env:
142
+
> email: admin@example.com
143
+
> password: admin-password
144
+
> ingress:
145
+
> enabled: true
146
+
> hosts:
147
+
> - host: pgadmin.example.com
148
+
> paths:
149
+
> - path: /
150
+
> pathType: Prefix
151
+
> ```
152
+
153
+
**Option A — pgAdmin runs inside the same cluster (recommended):**
154
+
155
+
Since pgAdmin can resolve Kubernetes service names directly, no port-forward is needed:
156
+
157
+
| Field | Value |
158
+
|-------|-------|
159
+
| **Host name/address** | `<release-name>-postgresql` (Kubernetes service name) |
160
+
| **Port** | `5432` |
161
+
| **Maintenance database** | your database name (e.g., `PG_DATABASE`) |
162
+
| **Username** | your PostgreSQL admin user (e.g., `postgres`) |
163
+
| **Password** | *(retrieve from your Kubernetes secret, see below)* |
164
+
165
+
**Option B — pgAdmin runs outside the cluster:**
166
+
167
+
Create a port-forward first, then connect to `localhost`:
- Enable **Include CREATE DATABASE statement** for a full restore option
201
+
- Enable **Use Column Inserts** for maximum compatibility
202
+
10. Click **Backup**
203
+
11. Verify the backup completed successfully in the pgAdmin notifications panel (bell icon, bottom-right)
204
+
205
+
> ⚠️ **Note**: Unlike `pg_dumpall`, a pgAdmin single-database backup does **not** include roles or other databases. If you need to preserve roles and permissions, either use `pg_dumpall` (Step 2) or back up the global objects separately via pgAdmin's **Backup Server** option.
0 commit comments