We need to cover a few different scenarios here. One of the things we want to do is transfer files from one server to another. A popular way to do this is with the rsync command. On Debian or Ubuntu systems, we can install it as a root-capable user this way:
sudo apt-get install rsync
We also need it properly configured in order to use it. Create a file named /etc/rsyncd.conf and fill it with this content:
[archive] path = /db/wal_archive comment = Archived Transaction Logs uid = postgres gid = postgres read only = true
We're now ready to protect our data from hardware problems.