Backups: logical vs physical
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
choose the right backup type.
Planned topics
- Logical backup (
pg_dump,pg_dumpall): SQL or archive of data and schema; portable across versions; slow to restore on big databases; consistent snapshot of one database. - Physical backup (
pg_basebackup, file-level): a copy of the data directory; fast restore; same major version only; the basis for point-in-time recovery. - A backup is useful only if restored; schedule and monitor both.
- Store backups off the database host; encrypt them.
Draft outline details
Demonstration
pg_dump -Fc -f shop.dump shop
pg_basebackup -D /backup/base -Fp -X streamCheck your understanding
Which backup type allows point-in-time recovery?
Show answer
Physical backup plus archived WAL.
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.