Archiving transaction log data
PSR can send transaction log data to a remote node, even if the node is not a full PostgreSQL server, so that it can be archived. This can be useful for various purposes, such as the following:
- Restoring a hot physical backup
- Investigating the contents of previous transactions
Getting ready
Normally, backups should be taken regularly on a production system; if you have configured Barman already, as described in the Hot physical backups with Barman recipe of Chapter 11, Backup and Recovery, then you are already archiving transaction logs because they are needed to restore a physical backup, so no further action is needed, and you can skip to the How to do it... section of the current recipe.
PostgreSQL includes two client tools to stream transaction data from the server to the client. The tools are designed using a pull model; that is, you run the tools on the node you wish the data to be saved on:
pg_receivewal...