Howto reliably ship WAL log files between master and slave I have a replication master and a slave on two different computers. Actually both databases are running in docker containers, and their WAL archive directories are exposed to the host machine using docker's bind mount. They are also connected with streaming replication, but the network connection between them is not reliable. Sometimes the network is down for a minute or so. Usually the speed of the network is fine, but there are outages a couple of times per day.

I just can't mount the slave's directory on the master, because of the unreliable network. The master postgres should be able to execute the archive command quickly, even if the network is down. I need a good utility that allows me to reliably ship log files between the two computers? E.g. start the transfer of a file, retry until it succeeds, then delete the original file after the transfer has been completed. rsync is not an option, because it does not move files, only copies them. (At least I don't know how to use it for this purpose.)

Does anyone know a solution that can be used out of the box? I can write my own program for this, but I don't want to reinvent the wheel.
I'd use streaming replica "out of the box".  It will restart itself after a network hiccup just fine.  If you are afraid the WAL will get recycled before it is streamed, use a replication slot to prevent that from happening.