The pgbackrest.conf file
Now, after modifying postgresql.conf, let’s go to modify the pgbackrest.conf file of the PostgreSQL server. Let’s remember that the PostgreSQL server has ip= 192.168.122.170, and that the IP of the disaster recovery server is 192.168.122.170. Let’s now edit the /etc/pgbackrest.conf file; delete what is present and add these lines:
[global]
backup-host=192.168.122.120
backup-user=postgres
backup-ssh-port=22
log-level-console=info
log-level-file=info
[pg1]
pg1-path = /var/lib/postgresql/16/main
pg1-port = 5432
As for the repository configuration, the file is composed of sections: a global section and a section for each stanza.
For the global section, we have the following options:
backup-host: The repository hostbackup-user: The user used for the backupbackup-ssh-port: Thesshportlog-level-console=infoandlog-level-file=info: As we’ve seen in the previous section
For the stanza...