Skip to content
Ameen Abozaid
Planned lessonMID-018-L01

Backups: logical vs physical

  • Lesson 1 of 6
  • Mid-level
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

bash
pg_dump -Fc -f shop.dump shop
pg_basebackup -D /backup/base -Fp -X stream

Check 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.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.