You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-05-22 10:15:16 +02:00
Add standby restore type.
This restore type automatically adds standby_mode=on to recovery.conf. This could be accomplished previously by setting --recovery-option=standby_mode=on but PostgreSQL 12 requires standby mode to be enabled by a special file named standby.signal. The new restore type allows us to maintain a common interface between PostgreSQL versions.
This commit is contained in:
@@ -70,15 +70,15 @@ repo1-host-config=[TEST_PATH]/db-master/pgbackrest.conf
|
||||
repo1-host-user=[USER-1]
|
||||
spool-path=[TEST_PATH]/db-standby/spool
|
||||
|
||||
restore, type 'default', remap - restore backup on replica (db-standby host)
|
||||
> [CONTAINER-EXEC] db-standby [BACKREST-BIN] --config=[TEST_PATH]/db-standby/pgbackrest.conf --recovery-option=standby_mode=on --recovery-option="primary_conninfo=host=db-master port=6543 user=replicator" --link-map="pg_xlog=[TEST_PATH]/db-standby/db/pg_xlog" --link-all --stanza=db restore
|
||||
restore, type 'standby', remap - restore backup on replica (db-standby host)
|
||||
> [CONTAINER-EXEC] db-standby [BACKREST-BIN] --config=[TEST_PATH]/db-standby/pgbackrest.conf --recovery-option="primary_conninfo=host=db-master port=6543 user=replicator" --type=standby --link-map="pg_xlog=[TEST_PATH]/db-standby/db/pg_xlog" --link-all --stanza=db restore
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
+ supplemental file: [TEST_PATH]/db-standby/db/base/recovery.conf
|
||||
-----------------------------------------------------------------
|
||||
primary_conninfo = 'host=db-master port=6543 user=replicator'
|
||||
standby_mode = 'on'
|
||||
restore_command = '[BACKREST-BIN] --config=[TEST_PATH]/db-standby/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
||||
standby_mode = 'on'
|
||||
|
||||
full backup - backup from standby, failure to access at least one standby (db-master host)
|
||||
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --pg8-host=bogus --backup-standby --type=full --stanza=db backup
|
||||
|
||||
Reference in New Issue
Block a user