
PostgreSQL Backups and Point-in-Time Recovery with pgBackRest
This article is part of a series on PostgreSQL WAL. Part 1 - How PostgreSQL WAL Actually Works Part 2 - How Debezium Uses PostgreSQL WAL for CDC Part 3 - PostgreSQL Backups with pgBackRest and PITR In the previous articles, we've explored how PostgreSQL records every change inside the database using Write-Ahead Logging (WAL) . We also saw how tools like Debezium can read WAL to stream database changes in real time. But WAL has another very important role. It enables database backups and recovery . By combining a base backup with archived WAL segments, PostgreSQL can restore a database to any specific moment in time . This capability is known as Point-in-Time Recovery (PITR) . In this article, we’ll explore how this works and how to implement it using pgBackRest. Why Backups Alone Are Not Enough A common backup strategy is to take periodic full backups of a database. For example: 02:00 → Full backup taken 14:00 → Accidental DELETE executed If we restore the 02:00 backup, the database re
Continue reading on Dev.to
Opens in a new tab



