Backup and Recovery: PG_Dump vs. PG_BackRest Quiz

Home โ€บ PostgreSQL DBA โ€บ Backup and Recovery: PG_Dump vs. PG_BackRest
๐Ÿ’พ Postgres Database Administration โ€“ Backup and Recovery: PG_Dump vs. PG_BackRest
20 questions  ยท  15 min timer  ยท  Explanations included  ยท  Free

PostgreSQL Backup and Recovery Quiz โ€” PG_Dump vs. PG_BackRest

Master PostgreSQL backup and recovery โ€” a critical skill for every PostgreSQL DBA. This quiz compares the two most widely used backup tools: pg_dump for logical backups and pgBackRest for physical, incremental, and WAL-based backups. Understanding when and how to use each tool is essential in production database environments.

๐Ÿ“Œ What this quiz covers:
  • pg_dump vs pg_dumpall โ€” use cases and limitations
  • pgBackRest full, differential, and incremental backup strategies
  • WAL archiving and Point-in-Time Recovery (PITR)
  • Delta restore and parallel backup/restore features
  • High-availability backup considerations for replica setups
  • Retention policies and repository management
โฑ 15 min โ“ 20 questions ๐ŸŽฏ PostgreSQL DBA Prep ๐Ÿ’ก Explanations included ๐Ÿ†“ Free
Home โ€บ PostgreSQL DBA โ€บ Backup and Recovery: PG_Dump vs. PG_BackRest
๐Ÿ’พ Postgres Database Administration – Backup and Recovery: PG_Dump vs. PG_BackRest
20 questions  ยท  15 min timer  ยท  Explanations included  ยท  Free
1. 
Which of the following best describes the role of the pgBackRest stanza?

1 out of 20

PostgreSQL Backup & Recovery โ€” Key Concepts Every DBA Must Know

PG_Dump โ€” Logical Backups

pg_dump exports a single database into a SQL script or archive file. It is platform-independent, making it ideal for migrations and schema transfers. Key flags to know:

  • -F c โ€” custom format (compressed, supports parallel restore)
  • -F d โ€” directory format (best for large databases)
  • pg_dumpall โ€” dumps all databases including roles and tablespaces
  • pg_restore โ€” restores from custom or directory format dumps

Limitation: pg_dump takes a logical snapshot โ€” it does not support Point-in-Time Recovery (PITR) and can be slow for very large databases.

PG_BackRest โ€” Physical Backups at Scale

pgBackRest is a robust backup solution designed for large PostgreSQL deployments. It supports:

  • Full backups โ€” complete copy of the data directory
  • Differential backups โ€” changes since the last full backup
  • Incremental backups โ€” changes since the last backup of any type
  • Delta restore โ€” restores only changed blocks, dramatically faster recovery
  • Parallel processing โ€” uses multiple CPU cores for faster backup/restore
  • WAL archiving โ€” enables PITR to any point in time

PG_Dump vs PG_BackRest โ€” When to Use Which

Feature pg_dump pgBackRest
Backup type Logical Physical
PITR support โŒ No โœ… Yes
Cross-platform โœ… Yes โŒ No
Large DB performance Slow Fast (parallel)
Incremental backup โŒ No โœ… Yes
Best for Migration, small DBs Production, large DBs

Common DBA Interview & Exam Mistakes

  • Assuming pg_dump supports PITR โ€” it does not
  • Forgetting that pgBackRest requires WAL archiving to be enabled for PITR
  • Not testing restores regularly โ€” backups are only valid when restore works
  • Skipping retention policy configuration โ€” disk fills up silently
  • Confusing pg_dump (single DB) with pg_dumpall (all DBs + globals)

Want to practice more PostgreSQL topics?

โ† Back to All PostgreSQL Quizzes
Scroll to Top