For this procedure, we will continue to use two servers. The backup server will still be named pg-backup, and our primary PostgreSQL server is pg-primary. As usual, the PostgreSQL data directory will be located at /db/pgdata.
Follow these steps to send WAL files from pg-primary to pg-backup:
- On the pg-backup server, create a directory writable by the postgres user with the following commands as a root-capable user:
sudo mkdir /db/pg_archived sudo chown postgres:postgres /db/pg_archived
- Create a file named omnipitr.conf in the /etc directory on pg-primary with the following contents:
--data-dir /db/pgdata --dst-remote postgres@pg-backup:/db/pg_archived --log /var/log/postgresql/omnipitr.log
- Modify the postgresql.conf ...