How to do it...

Our archive server has a 3 TB mount at the /db directory and is named arc_server on our network. The PostgreSQL source server resides at 192.168.56.10. Follow these steps for long-term storage of important WAL files on an archive server:

  1. Enable rsync to run as a daemon on the archive server.
  2. On Debian-based systems, edit the /etc/default/rsync file and change the RSYNC_ENABLE variable to true.
  3. On Red-Hat-based systems, edit the /etc/xinet.d/rsync file and change the disable parameter to no.
  4. Create a directory to store archived WAL files as the postgres user with these commands:
        sudo mkdir /db/pg_archived
        sudo chown postgres:postgres /db/pg_archived

 

  1. Create a file named /etc/rsyncd.conf and fill it with the following ...

Get PostgreSQL High Availability Cookbook - Second Edition 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.