Table of Contents
pg_probackup3 is a solution to manage local or remote backup and recovery of Postgres Pro database clusters. It is designed to perform backups of the Postgres Pro instance that enable you to restore the server in case of a failure.
As compared to other backup solutions, pg_probackup3 offers the following benefits that can help you implement different backup strategies and deal with large amounts of data:
S3 support for storing data in private clouds using MinIO object storage, Amazon S3 storage, VK Cloud storage and Google Cloud Storage: provided in Postgres Pro Enterprise. Backup data is transferred to and from S3 without saving it in intermediate locations thus eliminating the need of having a large temporary storage.
Tape ready: pg_probackup3 supports working with tape storage backup systems.
NFS v4 and v5 support: pg_probackup3 allows storing backups in the network file system.
Incremental backup: With three different incremental modes, you can plan the backup strategy in accordance with your data flow. Incremental backups allow you to save disk space and speed up backup as compared to taking full backups. It is also faster to restore the cluster by applying incremental backups than by replaying WAL files.
Remote operations: backing up Postgres Pro instance located on a remote system or restoring a backup remotely.
External directories: backing up files and directories located outside of the Postgres Pro data directory (
PGDATA
), such as scripts, configuration files, logs, or SQL dump files.Backup catalog: getting the list of backups and the corresponding meta information in plain text or JSON formats.
Archive catalog: getting the list of all WAL timelines and the corresponding meta information in plain text or JSON formats.
Integration with other applications enabled by the API provided by the libprobackup library.
To manage backup data, pg_probackup3 creates a backup catalog. This is a directory that stores all backup files with additional meta information, as well as WAL archives required for point-in-time recovery. You can store backups for different instances in separate subdirectories of a single backup catalog.
Using pg_probackup3, you can take full or incremental backups:
FULL backups contain all the data files required to restore the database cluster.
Incremental backups operate at the page level, only storing the data that has changed since the previous backup. It allows you to save disk space and speed up the backup process as compared to taking full backups. It is also faster to restore the cluster by applying incremental backups than by replaying WAL files. pg_probackup3 supports the following modes of incremental backups:
DELTA backup. In this mode, pg_probackup3 reads all data files in the data directory and copies only those pages that have changed since the previous backup. This mode can create read-only I/O load equal to that of a full backup.
PTRACK backup. In this mode, Postgres Pro tracks page changes on the fly. Continuous archiving is not necessary for it to operate. Each time a relation page is updated, this page is marked in a special PTRACK bitmap. Tracking implies some minor overhead on the database server operation, but speeds up incremental backups significantly.
pg_probackup3 can take only physical online backups, and online backups require WAL for consistent recovery. So regardless of the chosen backup mode (FULL or DELTA), any backup taken with pg_probackup3 must use the following WAL delivery mode:
STREAM. Such backups include all the files required to restore the cluster to a consistent state at the time the backup was taken. Regardless of continuous archiving having been set up or not, the WAL segments required for consistent recovery are streamed via the replication protocol during backup and included into the backup files. That's why such backups are called autonomous, or standalone.
ARCHIVE. Such backups rely on continuous archiving to ensure consistent recovery. This is the default WAL delivery mode.
In pg_probackup3 there are the following modes of backup data sources: