1.3. pg_probackup3 Backup Data Source Modes #
The pg_probackup3 utility supports the following backup data source modes: BASE, DIRECT, and PRO. The chosen mode determines how the connection to the database server is established and how the files for creating the backup are obtained.
The table below provides a concise overview of the key differences between these backup data source modes.
Backup Data Source Mode | Data Transfer Method | libpgprobackup Library Required | Validation | CFS Support | Additional Extensions Required |
---|---|---|---|---|---|
BASE | Via the pg_basebackup replication protocol | No | Yes | No | None |
DIRECT | Direct filesystem access | No | Yes | Yes | PTRACK (for incremental backups) |
PRO | Via the proprietary replication protocol | Yes | Yes | Yes | pgpro_bindump (for protocol implementation), PTRACK (for incremental backups) |
A detailed description of each mode is provided in the sections below.
1.3.1. BASE #
The BASE mode uses the standard pg_basebackup replication protocol. Data is copied without using advanced change-tracking and segmentation mechanisms.
Features:
Copies data via the replication protocol using the
libpq
library.Compatible with PostgreSQL and requires no additional extensions.
Limitations:
Requires access to system functions.
Does not support accelerated incremental mechanisms (PTRACK).
Generally slower for large data volumes compared to other modes.
1.3.2. DIRECT #
In the DIRECT mode, the pg_probackup3 utility gains direct access to the PGDATA
directory via the filesystem, bypassing the replication protocol for file transfer.
Features:
Uses a standard database connection.
Performs data integrity checks during transfer.
Suitable for cases where access via the replication protocol is unavailable or undesirable.
Limitations:
Requires direct access to the server filesystem.
Requires access to system functions.
For remote servers, requires SSH-based filesystem access.
1.3.3. PRO #
The PRO mode uses a dedicated library, which includes data processing logic, and its own backup protocol. This protocol is specifically designed for secure and fast data transfer from the server.
Features:
Connects to the database via the system
libpq
library.Transfers data via its own proprietary replication protocol.
Supports all backup types: FULL, DELTA, and PTRACK.
Optimized for performance and reduced server load.
Performs data integrity checks during transfer.
Limitations:
Requires the pgpro_bindump extension to be installed on the server side.
Requires the library to be installed on both the server and the host with the utility.
Can only be used with Postgres Pro.
Configuring continuous WAL archiving to a remote server requires an SSH connection (not required for STREAM mode).