Streaming replication (Advanced)
The last topic we are going to cover is a newer method for indefinite binary recovery over a network connection known as streaming replication. A backup restored this way would always be a working copy of the database, and does not require third-party tools like rsync
to utilize. Being always online, this is a perfect candidate for disaster recovery scenarios instead of merely pure backup availability.
Getting ready
Please refer to the Getting a basic export (Simple) recipe to bootstrap our database. Before we start the server to create the sample
database, we need to change a few settings in postgresql.conf
using the following code:
wal_level = hot_standby max_wal_senders = 5
Then we must allow a user to connect from ...
Get Instant PostgreSQL Backup and Restore How-to 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.