How it works...

pgBackRest operates under the assumption that repositories act as central storage locations for all WAL and backup file contents, and that these repositories may be located remotely. This means we must install pgBackRest on any server that requires access to the repository. So, our first step is to install the software itself, allowing us to use the pgbackrest command-line utility.

To facilitate remote repository access, we need to ensure that pgBackRest can communicate directly with the pg-primary server as the postgres user since that is the user that owns the backup files on that system. Once more, we rely on ssh-copy-id to transmit the necessary SSH key to the pg-primary server.

The next step is to erase any existing PostgreSQL ...

Get PostgreSQL 12 High Availability Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.