Skip to content
Home » postgresql

postgresql

Understanding Incremental Data Backup in pg_rman

Previously, we discussed how to perform a simple backup using pg_rman. As pg_rman can back up PostgreSQL at the physical file copy level, it is quite useful for daily database maintenance. Particularly, pg_rman supports incremental backup, which only backs up the changed data. In this blog, I will explain how incremental backup works in pg_rman. Firstly, all of this relies on the table and index page layout implemented in PostgreSQL. In PostgreSQL, each data page is laid out like this. The pageHeaderData has many attributes, and one of the most important attributes is pd_lsn, which is updated to the last… Read More »Understanding Incremental Data Backup in pg_rman

Restore PostgreSQL with pg_rman

We discussed a topic on how to create simple backups using pg_rman. In this blog post, we will demonstrate how to restore PostgreSQL using a backup generated by pg_rman. In continuation of the previous blog, let’s execute a simple query before simulating an error. Now, let’s insert some new records into the database. At this point, let’s consider the insertion of 2000 records as a mistake. Instead of correcting or deleting these records individually, we aim to roll back the entire database to the previous stage, i.e., before inserting the last 2000 records. Now, let’s start by checking our backup.… Read More »Restore PostgreSQL with pg_rman

in-memory postgresql database

A simple way to backup PostgreSQL with pg_rman

Introduction PostgreSQL, a powerful open-source relational database, is known for its robustness and extensibility. One critical aspect of database management is ensuring reliable backup and recovery processes. While PostgreSQL provides tools like pg_basebackup and WAL archiving for this purpose, there’s a powerful external tool called pg_rman that takes this process to the next level. In this blog post, we’ll explore what pg_rman is, how to perform a simple backup with pg_rman. What is pg_rman? pg_rman is an advanced backup and recovery manager designed specifically for PostgreSQL databases. Developed by the open source community, it provides a range of features to… Read More »A simple way to backup PostgreSQL with pg_rman