Point in Time Recovery(PITR) in PostgreSQL 12/13

In this article, we will see Point in Time Recovery(PITR) in PostgreSQL 12/13 versions step by step procedure.

What is Point in Time Recovery?

Assume that we have full(basebackup) backup at midnight at 12:00AM and at 7:20AM some server crash happened due to various reasons. In this scenario WAL(write-ahead-log(transaction log) comes into picture. To restore up to 7:20AM, first we need to restore full backup (backup taken by using pg_basebackup) and then we have to replay WAL files. This restore process is nothing but PITR(Point time recovery).

Environment details:

Linux server: Ubuntu
PostgreSQL server version: 12/13
Continue reading Point in Time Recovery(PITR) in PostgreSQL 12/13

How to enable archive mode in PostgreSQL

In this article, we will see how to enable archive mode in PostgreSQL. Archive mode is not enabled by default in PostgreSQL.

What is archiving

Archiving is the concept to store history in a safe location. This also helps with Point In Time Recovery(PITR) and also in situations where a standby is lagging behind the primary and requires the recently removed WAL segments to get back to sync.

Steps to enable archive mode in PostgreSQL:
Continue reading How to enable archive mode in PostgreSQL