Backup & restore guides
Everything we know about not losing Postgres data — commands included, vendor pitches clearly marked.
How to back up a Supabase database (3 ways)
Manual pg_dump, Supabase's built-in backups, and automated verified backups — with the exact commands and the tradeoffs of each.
Supabase free tier: you have no backups (fix it in 10 minutes)
The Supabase free plan takes no automated backups. Here's the fastest path to a real, restorable backup — free options included.
Fixing pg_dump/pg_restore version mismatch errors
"server version mismatch" and "unsupported version in file header" explained — why they happen and the version-matching rules that prevent them.
Restoring a Neon database: PITR, branches, and dumps
Neon gives you three restore paths — point-in-time restore, branching from history, and plain pg_restore. When to use which.
pg_dump formats: custom vs plain vs directory (pick custom)
The four pg_dump output formats compared — compression, parallel restore, selective restore — and why custom format is the right default.
How to actually test a Postgres backup restores
A restore test is more than pg_restore exiting 0. The checklist: exit code, schema, row counts, index integrity, and query sanity.
Encrypting Postgres backups properly (envelope encryption)
Bucket-level SSE is not enough for database dumps. Client-side AES-256-GCM with envelope encryption, explained with commands.
Designing a backup retention policy (GFS explained)
How long to keep Postgres backups: the grandfather-father-son scheme, compliance drivers, and the one backup you must never delete.
pg_restore errors, decoded (and which ones to ignore)
role does not exist, must be owner of extension, already exists — the pg_restore errors that matter and the ones that are noise.
Restoring a Supabase backup into a new Supabase project
Migrating or recovering into a fresh Supabase project with pg_restore — auth schema, storage pointers, and the gotchas.
Monitoring backups with a dead-man switch
Backup jobs fail silently — cron won't tell you it stopped. Heartbeat monitoring (Healthchecks.io pattern) fixes the failure mode that matters most.
RDS automated backups: what they cover and what they don't
RDS snapshots and PITR are excellent — inside AWS. Cross-account risk, logical portability, and restore proof are the gaps.
Using amcheck to detect index corruption
Postgres indexes corrupt silently — queries return wrong answers, not errors. amcheck finds it. How to run it and what the errors mean.
PITR vs logical backups: you need both
WAL-based point-in-time recovery and pg_dump archives fail differently. The matrix of incidents shows why neither alone is enough.
Backing up Railway Postgres (beyond volume snapshots)
Railway snapshots restore disks, not data. Setting up pg_dump backups for Railway with the TCP proxy, plus a read-only role.
Streaming pg_dump straight to S3/R2 (no local disk)
Pipe pg_dump through encryption into aws s3 cp - for zero-disk backups: commands, multipart sizing, and failure handling.
Creating a proper read-only Postgres role for backups
The least-privilege role for pg_dump: grants, default privileges, the PUBLIC TEMP gotcha, and how to prove the role can't write.
How long will your Postgres restore take? (RTO math)
Restore time scales with data + index size, not dump size. How to measure your real RTO instead of guessing it during an outage.
Backup evidence for SOC 2: what auditors actually ask
Mapping backup practice to SOC 2 availability criteria: the policy, the evidence, and the restore-test question that fails teams.
Neon branches are not backups (and when they are enough)
Branches share the parent's storage and account. What branches solve brilliantly, and the three risks they can't cover.
pg_dump vs pg_dumpall: globals, roles, and what you're missing
pg_dump skips roles, tablespaces, and cluster settings. What pg_dumpall --globals-only covers and the combined backup recipe.
Backing up Postgres running in Docker (without the footguns)
docker exec pg_dump done right: version pinning, streaming out of the container, volume snapshots vs logical dumps, compose examples.
Detecting schema drift with pg_dump hashes
Hash pg_dump --schema-only output to detect unauthorized schema changes and verify restores byte-for-byte. Normalization tricks included.
Backing up large Postgres databases (100GB+) without pain
Directory-format parallel dumps, compression tradeoffs, replica-based dumping, and when logical backups stop scaling.
The Postgres backup security checklist
12 checks: credential scope, encryption at rest and in flight, key custody, access logging, deletion protection, and the plaintext audit.