Step 1 — Configuring Continuous Archiving on the Database Cluster

In this first step, you need to configure your PostgreSQL 12 cluster to archive the cluster’s WAL files in a directory different from the cluster’s data directory. To do this, you must first create a new directory somewhere to archive the WAL files.

Step 2 — Performing a Physical Backup of the PostgreSQL Cluster

It is important to take regular backups of your database to help mitigate data loss should the worst happen. PostgreSQL allows you to take both logical and physical backups of the database cluster. However, for PITR, you need to take a physical backup of the database cluster. That is, you need to make a copy of all the database’s files in PostgreSQL’s data directory.

Step 3 — Performing Point-In-Time-Recovery on the Database Cluster

Now that you have at least one physical backup of the database and you’re archiving the WAL files, you can now perform PITR, if you need to rollback the database to a previous state.

#postgresql #performing point #time-recovery #point

Set Up Continuous Archiving and Perform Point-In-Time-Recovery
1.35 GEEK