PostgreSQL backups explained
Doha I. · Published · Lire en français

A PostgreSQL backup strategy needs three things: regular backups on a schedule, a retention period long enough to notice a problem, and restores you have actually tested. Logical backups (dumps) are simple and portable; point-in-time recovery replays the write-ahead log to restore any moment, but costs more to run. Take a manual backup before risky changes.
Nobody needs backups until the day someone runs a DELETE without a WHERE. A good backup plan is decided before that day.
What can go wrong
- Human error: a bad migration, a wrong update, a dropped table.
- Application bugs that corrupt data slowly, noticed days later.
- Infrastructure failure, which managed services usually cover separately.
Backups protect mostly against the first two, which is why retention matters: a bug noticed after 5 days needs a backup older than 5 days.
Two kinds of backup
| Kind | How it works | Strength | Limit |
|---|---|---|---|
| Logical (dump) | Exports schema and data | Simple, portable, restorable elsewhere | Restores to the moment of the backup |
| Point-in-time recovery | Base backup plus write-ahead log | Restore to any second in a window | More storage, usually a paid add-on |
A plan that works
- Schedule backups (daily is a sensible default; hourly for busy data).
- Take a manual backup before every migration or bulk change.
- Keep backups long enough to notice slow damage.
- Test a restore into a copy regularly. An untested backup is a hope, not a plan.
Backups on LordBase
LordBase includes manual and scheduled backups (hourly, daily, weekly or monthly) on every plan, kept 3 days on Free, 7 on Basic and 14 on Professional, custom on Enterprise. You can restore PostgreSQL backups and follow the restore's progress in the dashboard, the API, or from an AI assistant through the MCP server. LordBase does not offer point-in-time recovery: pair scheduled backups with a manual backup before risky changes.
