postgres-impl-backup-restore
Installation
SKILL.md
postgres-impl-backup-restore
Quick Reference :
PostgreSQL has two backup families and you almost always need both.
- Logical (
pg_dump,pg_dumpall) : a SQL-or-archive snapshot of one database. Portable across major versions and CPU architectures, restorable per-table, but slow to restore for large databases and consistent only as of backup start. - Physical (
pg_basebackup+ archived WAL) : a binary copy of the whole cluster. Fast to restore, enables Point-In-Time Recovery to any second within retention, but pinned to the same major version.
Real-world rule : run physical backups + WAL archiving for disaster recovery and PITR, AND periodic logical dumps for cross-version migration and accidental-drop recovery.