Restore drills
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
prove backups work by restoring them regularly.
Planned topics
- Restore a custom-format dump with
pg_restore -d newdb; use--jobsfor parallelism. - Restore into a separate database or host, never over production first.
- Check the result: row counts, application smoke test, and elapsed time (your real recovery time).
- Automate the drill and alert on failure.
- Record the steps in a runbook.
Draft outline details
Demonstration
createdb shop_restore
pg_restore -d shop_restore --jobs 4 shop.dump
psql shop_restore -c "SELECT count(*) FROM orders;"Check your understanding
What number does a restore drill give you that a backup job does not?
Show answer
The real recovery time, and proof the backup is usable.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.