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:
- Enable rsync to run as a daemon on the archive server.
- On Debian-based systems, edit the /etc/default/rsync file and change the RSYNC_ENABLE variable to true.
- On Red-Hat-based systems, edit the /etc/xinet.d/rsync file and change the disable parameter to no.
- 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
- Create a file named /etc/rsyncd.conf and fill it with the following ...