Improve postgres backup portability and add Metabase restore runbook#4850
Open
themightychris wants to merge 2 commits intomainfrom
Open
Improve postgres backup portability and add Metabase restore runbook#4850themightychris wants to merge 2 commits intomainfrom
themightychris wants to merge 2 commits intomainfrom
Conversation
|
The following changes will be applied to the production Kubernetes cluster upon merge. BE AWARE this may not reveal changes that have been manually applied to the cluster getting undone—applying manual changes to the cluster should be avoided. monitoring-grafana, postgresql-backup, CronJob (batch) has changed:
...
wget -q -O - https://healthchecks.ops.k8s.jarv.us/ping/9095f868-4c8e-443c-80a4-9b9a22d9a8d8/start || echo "Failed to ping start"
# snapshot current database
echo "Snapshotting Database"
- pg_dumpall --clean \
+ pg_dump --clean --if-exists --no-owner --no-privileges \
| gzip --rsyncable \
| restic backup \
--host monitoring-grafana:postgresql-backup \
--stdin \
- --stdin-filename pg_dumpall.sql.gz
+ --stdin-filename pg_dump.sql.gz
sql_snapshot_status=$?
# prune aged snapshots
echo "Pruning aged snapshots"
...
metabase, postgresql-backup, CronJob (batch) has changed:
...
wget -q -O - https://healthchecks.ops.k8s.jarv.us/ping/f223e786-4fa4-44f9-a3db-3db5988a12cf/start || echo "Failed to ping start"
# snapshot current database
echo "Snapshotting Database"
- pg_dumpall --clean \
+ pg_dump --clean --if-exists --no-owner --no-privileges \
| gzip --rsyncable \
| restic backup \
--host metabase:postgresql-backup \
--stdin \
- --stdin-filename pg_dumpall.sql.gz
+ --stdin-filename pg_dump.sql.gz
sql_snapshot_status=$?
# prune aged snapshots
echo "Pruning aged snapshots"
...
sentry, postgresql-backup, CronJob (batch) has changed:
...
wget -q -O - https://healthchecks.ops.k8s.jarv.us/ping/93c6d460-e014-4b30-bf32-b7974bf5fa4d/start || echo "Failed to ping start"
# snapshot current database
echo "Snapshotting Database"
- pg_dumpall --clean \
+ pg_dump --clean --if-exists --no-owner --no-privileges \
| gzip --rsyncable \
| restic backup \
--host sentry:postgresql-backup \
--stdin \
- --stdin-filename pg_dumpall.sql.gz
+ --stdin-filename pg_dump.sql.gz
sql_snapshot_status=$?
# prune aged snapshots
echo "Pruning aged snapshots"
...
metabase-test, postgresql-backup, CronJob (batch) has changed:
...
wget -q -O - https://healthchecks.ops.k8s.jarv.us/ping/ff63f290-fe1c-4011-8405-0ba8b2636ea0/start || echo "Failed to ping start"
# snapshot current database
echo "Snapshotting Database"
- pg_dumpall --clean \
+ pg_dump --clean --if-exists --no-owner --no-privileges \
| gzip --rsyncable \
| restic backup \
--host metabase-test:postgresql-backup \
--stdin \
- --stdin-filename pg_dumpall.sql.gz
+ --stdin-filename pg_dump.sql.gz
sql_snapshot_status=$?
# prune aged snapshots
echo "Pruning aged snapshots"
... |
ohrite
approved these changes
Feb 27, 2026
bb6cb3e to
913eb64
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
pg_dumpalltopg_dump --no-owner --no-privilegesso dumps are directly importable into Cloud SQL without needing to extract database sections or remap roles.Resolves #4757
Type of change
How has this been tested?
Post-merge follow-ups