pgBackRest can be used to perform faster backups using its parallel backup feature along with the support to perform incremental and differential backups. As pgBackRest can be performed remotely, it can also be used to take a backup from a standby server. In this recipe, we shall see how pgBackRest can be used to perform a full backup from a primary/master or a standby server.
Getting ready
In order to perform a backup using pgBackRest, it needs to be installed both on the local and also the remote server from where the backup is being performed (if the backup is being performed from a remote server).
The backup user should have the REPLICATION role to perform the backup. Even a superuser could perform the backup but it is always recommended to limit SUPERUSER to administrative tasks. Additionally, enable trusted SSH authentication using public keys between the database server and the backup server.
How to do it
The following are the steps...