Another option for restoring a PostgreSQL backup is to restore indefinitely. A backup restored this way would always be a working copy of the database, available with a single activation command (
warm), or online for read-only queries (
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 as shown in the following code:
wal_level = hot_standby archive_mode = on archive_command = 'rsync -a %p postgres@backup::archive/%f'
Next, we will want to set up the
backup server with an
[db_sync] path = /db/pgdata comment = DB Backup Server ...