Obtaining a binary backup (Simple)
Another backup method available to PostgreSQL is a base
backup, which consists of the actual data files themselves. These kinds of backups do not need to be restored, only uncompressed or copied. Using them can be more complicated, but they can be ready much faster depending on the database size. The developers have kindly provided pg_basebackup
as a simple starting point.
Getting ready
Please refer to the Getting a basic export (Simple) recipe on preparing a sample
database.
Next we need to modify the postgresql.conf
file for our database to run in the proper mode for this type of backup. Change the following configuration variables:
wal_level = archive max_wal_senders = 5
Then we must allow a super user to connect ...
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.