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:
@@ -227,14 +227,14 @@ restore delta, force, type 'name', target 'backrest' (db-master host)
|
||||
restore_command = '[BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
||||
recovery_target_name = 'backrest'
|
||||
|
||||
restore delta, backup '[BACKUP-INCR-1]', type 'default', timeline '4' (db-master host)
|
||||
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --delta --set=[BACKUP-INCR-1] --target-timeline="4" --link-all --stanza=db restore
|
||||
restore delta, backup '[BACKUP-INCR-1]', type 'standby', timeline '4' (db-master host)
|
||||
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --delta --set=[BACKUP-INCR-1] --type=standby --target-timeline="4" --link-all --stanza=db restore
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
+ supplemental file: [TEST_PATH]/db-master/db/base/recovery.conf
|
||||
----------------------------------------------------------------
|
||||
standby_mode = 'on'
|
||||
restore_command = '[BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
||||
standby_mode = 'on'
|
||||
recovery_target_timeline = '4'
|
||||
|
||||
incr backup - fail on --no-online (db-master host)
|
||||
@@ -251,7 +251,6 @@ incr backup - succeed on --no-online with --force (db-master host)
|
||||
pg1-path=[TEST_PATH]/db-master/db/base
|
||||
pg1-port=6543
|
||||
pg1-socket-path=[TEST_PATH]/db-master/db
|
||||
recovery-option=standby-mode=on
|
||||
|
||||
[global]
|
||||
archive-async=y
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -72,15 +72,15 @@ spool-path=[TEST_PATH]/db-standby/spool
|
||||
archive-copy=y
|
||||
start-fast=y
|
||||
|
||||
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 reach master (db-standby host)
|
||||
> [CONTAINER-EXEC] db-standby [BACKREST-BIN] --config=[TEST_PATH]/db-standby/pgbackrest.conf --pg8-host=bogus --backup-standby --type=full --stanza=db backup
|
||||
|
||||
@@ -101,15 +101,15 @@ repo1-path=[TEST_PATH]/backup/repo
|
||||
archive-copy=y
|
||||
start-fast=y
|
||||
|
||||
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 (backup host)
|
||||
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --pg8-host=bogus --backup-standby --type=full --stanza=db backup
|
||||
|
||||
Reference in New Issue
Block a user