Database Engineering · When things go wrong
Backups and point-in-time recovery
A backup is a copy you can restore. A nightly base backup plus an archive of every WAL segment can rewind a database to the second before a mistake, but only a tested restore proves it.
- Time18 min
- LevelDeveloper
- Experiments1 live
- Check6 questions






Freeze put the app in maintenance mode and keep the damaged data directory.
Find the moment logs or pg_waldump show the DELETE committed at 14:03:00.
Check, then open row counts, newest orders, known records; then end recovery.
Soft delete rows marked deleted, recoverable by the app in seconds.
Delayed replica an hour behind; pull rows out before it replays the mistake.
Off-site, write-once copy survives a lost region or a stolen password.