Quick Start
Suggest editsThis section walks you through basic pgBackRest configuration process and how to take a first backup of the database cluster running locally. It also gives a brief introduction of the backup
, restore
, and info
commands.
The installation procedure must be followed before proceeding to this section.
Configuration
The default pgBackRest configuration file location is /etc/pgbackrest/pgbackrest.conf
. If it does not exist, then /etc/pgbackrest.conf
is used next.
For more information about configuration parameters, see the appendix section.
The following example configures a demo
stanza to take a backup of a database cluster running on the local host.
For EDB Postgres Advanced Server:
The pg-version-force
value should be set to the same major version number as the server reports when using show server_version_num;
in PSQL. Only the first two digits are the major version. For example, 15000 is major version 15.
For PostgreSQL:
Once pgBackRest is configured, set up the database archiver process:
As changing the archive_mode
parameter requires a service restart, and changing the archive_command
only requires a configuration reload, we recommend enabling archive_mode
with an empty archive_command
(or pointing to /bin/true) when initiating a new database cluster.
Assume the identity of a system user (postgres
or enterprisedb
) and initiate the pgBackRest repository:
Check the configuration and the archiving process:
Backups
When invoking pgBackRest, you can specify any one of the backup type:
- Full backup -
full
- Copies all database cluster files.
- No dependencies on previous backups.
For example: