mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +02:00
a3e5e66f05
Test matrices were previously simplified for the mock/* tests (e.g.d4410611
,d489eb87
) but not for real/all since the rules for which tests would run with which options was extremely complex. This only got more complex when new compression formats were added. Because the loop-generated matrix was so large, mosts tests were skipped for most option combinations following arcane logic which was nearly impossible to decipher even when reading the code, and completely impossible from the test.pl interface. As a consequence, important tests got excluded. For example, backup from standby was excluded for most versions of PostgreSQL because it was only run once per distro, against the latest version to be included in that distro. Simplify the tests by having a single run per PostgreSQL version and vary test parameters according to the capabilities of each version and the underlying distro. So, ZST testing is based on whether the distro supports ZST. Every test is run for each set of parameters based on the capabilities of the PostgreSQL version, e.g. backup from standby is not attempted on versions that don't support it. Note that since more tests are running the overall time to run the mock/all tests has increased by about 20-25%. Some time may be saved my removing tests that are adequately covered by unit tests but that should the subject of another commit. Another option would be to limit some non version-specific tests to a single, well defined version of PostgreSQL, .e.g the version that is run by expect tests, currently 9.6. The motivation for this refactor is that new storage drivers are coming and the loop-generated test matrix simply was not up to the task of adding them. The following is an example of the new test log (note longer runtime of each test): module=real, test=all, run=1, pg-version=10 (106.91s) module=real, test=all, run=1, pg-version=9.5 (151.09s) module=real, test=all, run=1, pg-version=9.2 (123.11s) module=real, test=all, run=1, pg-version=9.1 (129s) vs. the old test log (sub-second tests were skipped entirely): module=real, test=all, run=2, pg-version=10 (0.31s) module=real, test=all, run=3, pg-version=10 (0.26s) module=real, test=all, run=4, pg-version=10 (60.39s) module=real, test=all, run=1, pg-version=10 (69.12s) module=real, test=all, run=6, pg-version=10 (34s) module=real, test=all, run=5, pg-version=10 (42.75s) module=real, test=all, run=2, pg-version=9.5 (0.21s) module=real, test=all, run=3, pg-version=9.5 (0.21s) module=real, test=all, run=4, pg-version=9.5 (0.21s) module=real, test=all, run=5, pg-version=9.5 (0.26s) module=real, test=all, run=6, pg-version=9.5 (0.21s) module=real, test=all, run=1, pg-version=9.2 (72.78s) module=real, test=all, run=2, pg-version=9.2 (0.26s) module=real, test=all, run=3, pg-version=9.2 (0.31s) module=real, test=all, run=4, pg-version=9.2 (0.21s) module=real, test=all, run=5, pg-version=9.2 (0.21s) module=real, test=all, run=6, pg-version=9.2 (0.21s) module=real, test=all, run=1, pg-version=9.5 (88.41s) module=real, test=all, run=2, pg-version=9.1 (0.21s) module=real, test=all, run=3, pg-version=9.1 (0.26s) module=real, test=all, run=4, pg-version=9.1 (0.21s) module=real, test=all, run=5, pg-version=9.1 (0.31s) module=real, test=all, run=6, pg-version=9.1 (0.26s) module=real, test=all, run=1, pg-version=9.1 (72.4s)
768 lines
34 KiB
Plaintext
768 lines
34 KiB
Plaintext
run 001 - bkp 1, sby 1, dst backup, cmp none, storage posix, enc 0
|
|
==================================================================
|
|
|
|
stanza-create db - main create stanza info files (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db stanza-create
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
check db - fail on missing archive.info file (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --archive-timeout=0.1 --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
full backup - fail on archive_mode=off (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --type=full --stanza=db backup
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
check db - fail on archive_mode=off (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --archive-timeout=0.1 --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
check db - fail on archive_mode=off (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --archive-timeout=0.1 --reset-pg2-host --reset-pg2-path --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
full backup - fail on invalid archive_command (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --type=full --stanza=db backup
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
check db - fail on invalid archive_command (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --archive-timeout=0.1 --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
check db - fail on invalid archive_command (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --archive-timeout=0.1 --reset-pg2-host --reset-pg2-path --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
check db - fail on archive timeout when archive-check=n (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --archive-timeout=0.1 --no-archive-check --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
check db - verify success (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --archive-timeout=5 --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
check db - verify success (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --archive-timeout=5 --reset-pg2-host --reset-pg2-path --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
check db - fail on archive mismatch after upgrade (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --archive-timeout=0.1 --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
check db - fail on archive mismatch after upgrade (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --archive-timeout=0.1 --reset-pg2-host --reset-pg2-path --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
check db - fail on archive timeout (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --archive-timeout=0.1 --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
check db - fail on archive timeout (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --archive-timeout=0.1 --reset-pg2-host --reset-pg2-path --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
check db - fail on backup info mismatch (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --archive-timeout=5 --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
check db - fail on backup info mismatch (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --archive-timeout=5 --reset-pg2-host --reset-pg2-path --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
check db - verify success after backup (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --archive-timeout=5 --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
check db - verify success after backup (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --archive-timeout=5 --reset-pg2-host --reset-pg2-path --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
stanza-create db - fail on backup info file missing from non-empty dir (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db stanza-create
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
stanza-create db - fail on database mismatch with directory (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --pg1-path=[TEST_PATH]/db-primary/db/testbase/ stanza-create
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
stanza-create db - successfully create stanza files to be upgraded (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --pg1-path=[TEST_PATH]/db-primary/db/testbase/ --no-online stanza-create
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
stanza-upgrade db - upgrade stanza files online (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db stanza-upgrade
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
full backup - fail on backup lock exists (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --type=full --stanza=db backup
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
full backup - update during backup (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --buffer-size=[BUFFER-SIZE] --type=full --stanza=db backup
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ supplemental file: [TEST_PATH]/db-primary/pgbackrest.conf
|
|
-----------------------------------------------------------
|
|
[db]
|
|
pg1-path=[TEST_PATH]/db-primary/db/base
|
|
pg1-port=6543
|
|
pg1-socket-path=[TEST_PATH]/db-primary/db
|
|
|
|
[global]
|
|
buffer-size=[BUFFER-SIZE]
|
|
compress-level=3
|
|
compress-level-network=1
|
|
compress-type=none
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-primary/lock
|
|
log-level-console=detail
|
|
log-level-file=[LOG-LEVEL-FILE]
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/db-primary/log
|
|
log-subprocess=[LOG-SUBPROCESS]
|
|
log-timestamp=n
|
|
protocol-timeout=60
|
|
repo1-host=backup
|
|
repo1-host-cmd=[BACKREST-BIN]
|
|
repo1-host-config=[TEST_PATH]/backup/pgbackrest.conf
|
|
repo1-host-user=[USER-1]
|
|
spool-path=[TEST_PATH]/db-primary/spool
|
|
|
|
+ supplemental file: [TEST_PATH]/db-standby/pgbackrest.conf
|
|
-----------------------------------------------------------
|
|
[db]
|
|
pg1-path=[TEST_PATH]/db-standby/db/base
|
|
pg1-port=6544
|
|
pg1-socket-path=[TEST_PATH]/db-standby/db
|
|
|
|
[global]
|
|
buffer-size=[BUFFER-SIZE]
|
|
compress-level=3
|
|
compress-level-network=1
|
|
compress-type=none
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-standby/lock
|
|
log-level-console=detail
|
|
log-level-file=[LOG-LEVEL-FILE]
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/db-standby/log
|
|
log-subprocess=[LOG-SUBPROCESS]
|
|
log-timestamp=n
|
|
protocol-timeout=60
|
|
repo1-host=backup
|
|
repo1-host-cmd=[BACKREST-BIN]
|
|
repo1-host-config=[TEST_PATH]/backup/pgbackrest.conf
|
|
repo1-host-user=[USER-1]
|
|
spool-path=[TEST_PATH]/db-standby/spool
|
|
|
|
+ supplemental file: [TEST_PATH]/backup/pgbackrest.conf
|
|
-------------------------------------------------------
|
|
[db]
|
|
pg1-host=db-primary
|
|
pg1-host-cmd=[BACKREST-BIN]
|
|
pg1-host-config=[TEST_PATH]/db-primary/pgbackrest.conf
|
|
pg1-host-user=[USER-1]
|
|
pg1-path=[TEST_PATH]/db-primary/db/base
|
|
pg1-port=6543
|
|
pg2-host=bogus
|
|
pg2-host-cmd=[BACKREST-BIN]
|
|
pg2-host-config=[TEST_PATH]/db-standby/pgbackrest.conf
|
|
pg2-host-user=[USER-1]
|
|
pg2-path=[TEST_PATH]/db-standby/db/base
|
|
pg8-host=db-standby
|
|
pg8-host-cmd=[BACKREST-BIN]
|
|
pg8-host-config=[TEST_PATH]/db-standby/pgbackrest.conf
|
|
pg8-host-user=[USER-1]
|
|
pg8-path=[TEST_PATH]/db-standby/db/base
|
|
pg8-port=6544
|
|
|
|
[global]
|
|
buffer-size=[BUFFER-SIZE]
|
|
compress-level=3
|
|
compress-level-network=1
|
|
compress-type=none
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/backup/lock
|
|
log-level-console=detail
|
|
log-level-file=[LOG-LEVEL-FILE]
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/backup/log
|
|
log-subprocess=[LOG-SUBPROCESS]
|
|
log-timestamp=n
|
|
protocol-timeout=60
|
|
repo1-path=[TEST_PATH]/backup/repo
|
|
|
|
[global:backup]
|
|
archive-copy=y
|
|
start-fast=y
|
|
|
|
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-primary 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
|
|
-----------------------------------------------------------------
|
|
# Recovery settings generated by pgBackRest restore on [TIMESTAMP]
|
|
primary_conninfo = 'host=db-primary port=6543 user=replicator'
|
|
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
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
full backup - backup from standby (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --repo1-retention-full=1 --backup-standby --type=full --stanza=db backup
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ supplemental file: [TEST_PATH]/db-primary/pgbackrest.conf
|
|
-----------------------------------------------------------
|
|
[db]
|
|
pg1-path=[TEST_PATH]/db-primary/db/base
|
|
pg1-port=6543
|
|
pg1-socket-path=[TEST_PATH]/db-primary/db
|
|
|
|
[global]
|
|
buffer-size=[BUFFER-SIZE]
|
|
compress-level=3
|
|
compress-level-network=1
|
|
compress-type=none
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-primary/lock
|
|
log-level-console=detail
|
|
log-level-file=[LOG-LEVEL-FILE]
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/db-primary/log
|
|
log-subprocess=[LOG-SUBPROCESS]
|
|
log-timestamp=n
|
|
protocol-timeout=60
|
|
repo1-host=backup
|
|
repo1-host-cmd=[BACKREST-BIN]
|
|
repo1-host-config=[TEST_PATH]/backup/pgbackrest.conf
|
|
repo1-host-user=[USER-1]
|
|
spool-path=[TEST_PATH]/db-primary/spool
|
|
|
|
+ supplemental file: [TEST_PATH]/db-standby/pgbackrest.conf
|
|
-----------------------------------------------------------
|
|
[db]
|
|
pg1-path=[TEST_PATH]/db-standby/db/base
|
|
pg1-port=6544
|
|
pg1-socket-path=[TEST_PATH]/db-standby/db
|
|
|
|
[db:restore]
|
|
|
|
[global]
|
|
buffer-size=[BUFFER-SIZE]
|
|
compress-level=3
|
|
compress-level-network=1
|
|
compress-type=none
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-standby/lock
|
|
log-level-console=detail
|
|
log-level-file=[LOG-LEVEL-FILE]
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/db-standby/log
|
|
log-subprocess=[LOG-SUBPROCESS]
|
|
log-timestamp=n
|
|
protocol-timeout=60
|
|
repo1-host=backup
|
|
repo1-host-cmd=[BACKREST-BIN]
|
|
repo1-host-config=[TEST_PATH]/backup/pgbackrest.conf
|
|
repo1-host-user=[USER-1]
|
|
spool-path=[TEST_PATH]/db-standby/spool
|
|
|
|
+ supplemental file: [TEST_PATH]/backup/pgbackrest.conf
|
|
-------------------------------------------------------
|
|
[db]
|
|
pg1-host=db-primary
|
|
pg1-host-cmd=[BACKREST-BIN]
|
|
pg1-host-config=[TEST_PATH]/db-primary/pgbackrest.conf
|
|
pg1-host-user=[USER-1]
|
|
pg1-path=[TEST_PATH]/db-primary/db/base
|
|
pg1-port=6543
|
|
pg2-host=bogus
|
|
pg2-host-cmd=[BACKREST-BIN]
|
|
pg2-host-config=[TEST_PATH]/db-standby/pgbackrest.conf
|
|
pg2-host-user=[USER-1]
|
|
pg2-path=[TEST_PATH]/db-standby/db/base
|
|
pg8-host=db-standby
|
|
pg8-host-cmd=[BACKREST-BIN]
|
|
pg8-host-config=[TEST_PATH]/db-standby/pgbackrest.conf
|
|
pg8-host-user=[USER-1]
|
|
pg8-path=[TEST_PATH]/db-standby/db/base
|
|
pg8-port=6544
|
|
|
|
[global]
|
|
archive-async=y
|
|
buffer-size=[BUFFER-SIZE]
|
|
compress-level=3
|
|
compress-level-network=1
|
|
compress-type=none
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/backup/lock
|
|
log-level-console=detail
|
|
log-level-file=[LOG-LEVEL-FILE]
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/backup/log
|
|
log-subprocess=[LOG-SUBPROCESS]
|
|
log-timestamp=n
|
|
protocol-timeout=60
|
|
repo1-path=[TEST_PATH]/backup/repo
|
|
|
|
[global:backup]
|
|
archive-copy=y
|
|
start-fast=y
|
|
|
|
check db - verify check command on standby (db-standby host)
|
|
> [CONTAINER-EXEC] db-standby [BACKREST-BIN] --config=[TEST_PATH]/db-standby/pgbackrest.conf --reset-pg2-host --reset-pg2-path --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
diff backup - backup for adhoc expire (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --type=diff --stanza=db backup
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ supplemental file: [TEST_PATH]/db-primary/pgbackrest.conf
|
|
-----------------------------------------------------------
|
|
[db]
|
|
pg1-path=[TEST_PATH]/db-primary/db/base
|
|
pg1-port=6543
|
|
pg1-socket-path=[TEST_PATH]/db-primary/db
|
|
|
|
[global]
|
|
buffer-size=[BUFFER-SIZE]
|
|
compress-level=3
|
|
compress-level-network=1
|
|
compress-type=none
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-primary/lock
|
|
log-level-console=detail
|
|
log-level-file=[LOG-LEVEL-FILE]
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/db-primary/log
|
|
log-subprocess=[LOG-SUBPROCESS]
|
|
log-timestamp=n
|
|
protocol-timeout=60
|
|
repo1-host=backup
|
|
repo1-host-cmd=[BACKREST-BIN]
|
|
repo1-host-config=[TEST_PATH]/backup/pgbackrest.conf
|
|
repo1-host-user=[USER-1]
|
|
spool-path=[TEST_PATH]/db-primary/spool
|
|
|
|
+ supplemental file: [TEST_PATH]/db-standby/pgbackrest.conf
|
|
-----------------------------------------------------------
|
|
[db]
|
|
pg1-path=[TEST_PATH]/db-standby/db/base
|
|
pg1-port=6544
|
|
pg1-socket-path=[TEST_PATH]/db-standby/db
|
|
|
|
[db:restore]
|
|
|
|
[global]
|
|
buffer-size=[BUFFER-SIZE]
|
|
compress-level=3
|
|
compress-level-network=1
|
|
compress-type=none
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-standby/lock
|
|
log-level-console=detail
|
|
log-level-file=[LOG-LEVEL-FILE]
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/db-standby/log
|
|
log-subprocess=[LOG-SUBPROCESS]
|
|
log-timestamp=n
|
|
protocol-timeout=60
|
|
repo1-host=backup
|
|
repo1-host-cmd=[BACKREST-BIN]
|
|
repo1-host-config=[TEST_PATH]/backup/pgbackrest.conf
|
|
repo1-host-user=[USER-1]
|
|
spool-path=[TEST_PATH]/db-standby/spool
|
|
|
|
+ supplemental file: [TEST_PATH]/backup/pgbackrest.conf
|
|
-------------------------------------------------------
|
|
[db]
|
|
pg1-host=db-primary
|
|
pg1-host-cmd=[BACKREST-BIN]
|
|
pg1-host-config=[TEST_PATH]/db-primary/pgbackrest.conf
|
|
pg1-host-user=[USER-1]
|
|
pg1-path=[TEST_PATH]/db-primary/db/base
|
|
pg1-port=6543
|
|
pg2-host=bogus
|
|
pg2-host-cmd=[BACKREST-BIN]
|
|
pg2-host-config=[TEST_PATH]/db-standby/pgbackrest.conf
|
|
pg2-host-user=[USER-1]
|
|
pg2-path=[TEST_PATH]/db-standby/db/base
|
|
pg8-host=db-standby
|
|
pg8-host-cmd=[BACKREST-BIN]
|
|
pg8-host-config=[TEST_PATH]/db-standby/pgbackrest.conf
|
|
pg8-host-user=[USER-1]
|
|
pg8-path=[TEST_PATH]/db-standby/db/base
|
|
pg8-port=6544
|
|
|
|
[global]
|
|
archive-async=y
|
|
buffer-size=[BUFFER-SIZE]
|
|
compress-level=3
|
|
compress-level-network=1
|
|
compress-type=none
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/backup/lock
|
|
log-level-console=detail
|
|
log-level-file=[LOG-LEVEL-FILE]
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/backup/log
|
|
log-subprocess=[LOG-SUBPROCESS]
|
|
log-timestamp=n
|
|
protocol-timeout=60
|
|
repo1-path=[TEST_PATH]/backup/repo
|
|
|
|
[global:backup]
|
|
archive-copy=y
|
|
start-fast=y
|
|
|
|
stop all stanzas (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf stop
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
incr backup - attempt backup when stopped (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db backup
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
start all stanzas (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf start
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
incr backup - fail on archive_mode=always (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db backup
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
expire --set=[BACKUP-DIFF-1] (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --set=[BACKUP-DIFF-1] --stanza=db expire
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
incr backup - update during backup (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stop-auto --buffer-size=[BUFFER-SIZE] --delta --stanza=db backup
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ supplemental file: [TEST_PATH]/db-primary/pgbackrest.conf
|
|
-----------------------------------------------------------
|
|
[db]
|
|
pg1-path=[TEST_PATH]/db-primary/db/base
|
|
pg1-port=6543
|
|
pg1-socket-path=[TEST_PATH]/db-primary/db
|
|
|
|
[global]
|
|
buffer-size=[BUFFER-SIZE]
|
|
compress-level=3
|
|
compress-level-network=1
|
|
compress-type=none
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-primary/lock
|
|
log-level-console=detail
|
|
log-level-file=[LOG-LEVEL-FILE]
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/db-primary/log
|
|
log-subprocess=[LOG-SUBPROCESS]
|
|
log-timestamp=n
|
|
protocol-timeout=60
|
|
repo1-host=backup
|
|
repo1-host-cmd=[BACKREST-BIN]
|
|
repo1-host-config=[TEST_PATH]/backup/pgbackrest.conf
|
|
repo1-host-user=[USER-1]
|
|
spool-path=[TEST_PATH]/db-primary/spool
|
|
|
|
+ supplemental file: [TEST_PATH]/db-standby/pgbackrest.conf
|
|
-----------------------------------------------------------
|
|
[db]
|
|
pg1-path=[TEST_PATH]/db-standby/db/base
|
|
pg1-port=6544
|
|
pg1-socket-path=[TEST_PATH]/db-standby/db
|
|
|
|
[db:restore]
|
|
|
|
[global]
|
|
buffer-size=[BUFFER-SIZE]
|
|
compress-level=3
|
|
compress-level-network=1
|
|
compress-type=none
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-standby/lock
|
|
log-level-console=detail
|
|
log-level-file=[LOG-LEVEL-FILE]
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/db-standby/log
|
|
log-subprocess=[LOG-SUBPROCESS]
|
|
log-timestamp=n
|
|
protocol-timeout=60
|
|
repo1-host=backup
|
|
repo1-host-cmd=[BACKREST-BIN]
|
|
repo1-host-config=[TEST_PATH]/backup/pgbackrest.conf
|
|
repo1-host-user=[USER-1]
|
|
spool-path=[TEST_PATH]/db-standby/spool
|
|
|
|
+ supplemental file: [TEST_PATH]/backup/pgbackrest.conf
|
|
-------------------------------------------------------
|
|
[db]
|
|
pg1-host=db-primary
|
|
pg1-host-cmd=[BACKREST-BIN]
|
|
pg1-host-config=[TEST_PATH]/db-primary/pgbackrest.conf
|
|
pg1-host-user=[USER-1]
|
|
pg1-path=[TEST_PATH]/db-primary/db/base
|
|
pg1-port=6543
|
|
pg2-host=bogus
|
|
pg2-host-cmd=[BACKREST-BIN]
|
|
pg2-host-config=[TEST_PATH]/db-standby/pgbackrest.conf
|
|
pg2-host-user=[USER-1]
|
|
pg2-path=[TEST_PATH]/db-standby/db/base
|
|
pg8-host=db-standby
|
|
pg8-host-cmd=[BACKREST-BIN]
|
|
pg8-host-config=[TEST_PATH]/db-standby/pgbackrest.conf
|
|
pg8-host-user=[USER-1]
|
|
pg8-path=[TEST_PATH]/db-standby/db/base
|
|
pg8-port=6544
|
|
|
|
[global]
|
|
archive-async=y
|
|
buffer-size=[BUFFER-SIZE]
|
|
compress-level=3
|
|
compress-level-network=1
|
|
compress-type=none
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/backup/lock
|
|
log-level-console=detail
|
|
log-level-file=[LOG-LEVEL-FILE]
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/backup/log
|
|
log-subprocess=[LOG-SUBPROCESS]
|
|
log-timestamp=n
|
|
protocol-timeout=60
|
|
repo1-path=[TEST_PATH]/backup/repo
|
|
|
|
[global:backup]
|
|
archive-copy=y
|
|
start-fast=y
|
|
|
|
check db - check command with tablespace (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --archive-timeout=5 --reset-pg2-host --reset-pg2-path --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
restore, type 'default', expect exit 38 - pg running (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --link-all --stanza=db restore
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
restore, type 'default', expect exit 40 - path not empty (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --link-all --stanza=db restore
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
restore, type 'default' (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --db-include=test2 --db-include=test3 --buffer-size=[BUFFER-SIZE] --link-all --stanza=db restore
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ supplemental file: [TEST_PATH]/db-primary/db/base/recovery.conf
|
|
-----------------------------------------------------------------
|
|
# Recovery settings generated by pgBackRest restore on [TIMESTAMP]
|
|
restore_command = '[BACKREST-BIN] --buffer-size=[BUFFER-SIZE] --config=[TEST_PATH]/db-primary/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
|
|
|
restore, force, backup '[BACKUP-FULL-1]', type 'immediate', target-action=promote (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --force --set=[BACKUP-FULL-1] --type=immediate --link-all --target-action=promote --stanza=db restore
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ supplemental file: [TEST_PATH]/db-primary/db/base/recovery.conf
|
|
-----------------------------------------------------------------
|
|
# Recovery settings generated by pgBackRest restore on [TIMESTAMP]
|
|
restore_command = '[BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
|
recovery_target = 'immediate'
|
|
recovery_target_action = 'promote'
|
|
|
|
restore, force, backup '[BACKUP-INCR-1]', type 'xid', target '[XID-TARGET-1]', target-action=promote (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --force --set=[BACKUP-INCR-1] --tablespace-map-all=../../tablespace --type=xid --target="[XID-TARGET-1]" --link-all --target-action=promote --stanza=db restore
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ supplemental file: [TEST_PATH]/db-primary/db/base/recovery.conf
|
|
-----------------------------------------------------------------
|
|
# Recovery settings generated by pgBackRest restore on [TIMESTAMP]
|
|
restore_command = '[BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
|
recovery_target_xid = '[XID-TARGET-1]'
|
|
recovery_target_action = 'promote'
|
|
|
|
restore, type 'preserve' (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --type=preserve --link-all --stanza=db restore
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ supplemental file: [TEST_PATH]/db-primary/db/base/recovery.conf
|
|
-----------------------------------------------------------------
|
|
# Recovery settings generated by pgBackRest restore on [TIMESTAMP]
|
|
restore_command = '[BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
|
recovery_target_xid = '[XID-TARGET-1]'
|
|
recovery_target_action = 'promote'
|
|
|
|
restore delta, type 'time', target '[TIMESTAMP-TARGET-1]', target-action=promote (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --delta --type=time --target="[TIMESTAMP-TARGET-1]" --link-all --target-action=promote --stanza=db restore
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ supplemental file: [TEST_PATH]/db-primary/db/base/recovery.conf
|
|
-----------------------------------------------------------------
|
|
# Recovery settings generated by pgBackRest restore on [TIMESTAMP]
|
|
restore_command = '[BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
|
recovery_target_time = '[TIMESTAMP-TARGET-1]'
|
|
recovery_target_action = 'promote'
|
|
|
|
restore delta, backup '[BACKUP-INCR-1]', type 'xid', target '[XID-TARGET-1]', exclusive, target-action=promote (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --delta --set=[BACKUP-INCR-1] --type=xid --target="[XID-TARGET-1]" --target-exclusive --link-all --target-action=promote --stanza=db restore
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ supplemental file: [TEST_PATH]/db-primary/db/base/recovery.conf
|
|
-----------------------------------------------------------------
|
|
# Recovery settings generated by pgBackRest restore on [TIMESTAMP]
|
|
restore_command = '[BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
|
recovery_target_xid = '[XID-TARGET-1]'
|
|
recovery_target_inclusive = 'false'
|
|
recovery_target_action = 'promote'
|
|
|
|
restore delta, force, type 'name', target 'backrest', target-action=promote (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --delta --force --type=name --target="backrest" --link-all --target-action=promote --stanza=db restore
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ supplemental file: [TEST_PATH]/db-primary/db/base/recovery.conf
|
|
-----------------------------------------------------------------
|
|
# Recovery settings generated by pgBackRest restore on [TIMESTAMP]
|
|
restore_command = '[BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
|
recovery_target_name = 'backrest'
|
|
recovery_target_action = 'promote'
|
|
|
|
restore delta, backup '[BACKUP-INCR-1]', type 'standby', timeline '4' (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --delta --set=[BACKUP-INCR-1] --type=standby --target-timeline="4" --link-all --stanza=db restore
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ supplemental file: [TEST_PATH]/db-primary/db/base/recovery.conf
|
|
-----------------------------------------------------------------
|
|
# Recovery settings generated by pgBackRest restore on [TIMESTAMP]
|
|
restore_command = '[BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
|
standby_mode = 'on'
|
|
recovery_target_timeline = '4'
|
|
|
|
incr backup - fail on --no-online (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --no-online --reset-pg2-host --reset-pg2-path --stanza=db backup
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
incr backup - succeed on --no-online with --force (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --no-online --force --reset-pg2-host --reset-pg2-path --stanza=db backup
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ supplemental file: [TEST_PATH]/db-primary/pgbackrest.conf
|
|
-----------------------------------------------------------
|
|
[db]
|
|
pg1-path=[TEST_PATH]/db-primary/db/base
|
|
pg1-port=6543
|
|
pg1-socket-path=[TEST_PATH]/db-primary/db
|
|
|
|
[global]
|
|
buffer-size=[BUFFER-SIZE]
|
|
compress-level=3
|
|
compress-level-network=1
|
|
compress-type=none
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-primary/lock
|
|
log-level-console=detail
|
|
log-level-file=[LOG-LEVEL-FILE]
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/db-primary/log
|
|
log-subprocess=[LOG-SUBPROCESS]
|
|
log-timestamp=n
|
|
protocol-timeout=60
|
|
repo1-host=backup
|
|
repo1-host-cmd=[BACKREST-BIN]
|
|
repo1-host-config=[TEST_PATH]/backup/pgbackrest.conf
|
|
repo1-host-user=[USER-1]
|
|
spool-path=[TEST_PATH]/db-primary/spool
|
|
|
|
+ supplemental file: [TEST_PATH]/db-standby/pgbackrest.conf
|
|
-----------------------------------------------------------
|
|
[db]
|
|
pg1-path=[TEST_PATH]/db-standby/db/base
|
|
pg1-port=6544
|
|
pg1-socket-path=[TEST_PATH]/db-standby/db
|
|
|
|
[db:restore]
|
|
|
|
[global]
|
|
buffer-size=[BUFFER-SIZE]
|
|
compress-level=3
|
|
compress-level-network=1
|
|
compress-type=none
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-standby/lock
|
|
log-level-console=detail
|
|
log-level-file=[LOG-LEVEL-FILE]
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/db-standby/log
|
|
log-subprocess=[LOG-SUBPROCESS]
|
|
log-timestamp=n
|
|
protocol-timeout=60
|
|
repo1-host=backup
|
|
repo1-host-cmd=[BACKREST-BIN]
|
|
repo1-host-config=[TEST_PATH]/backup/pgbackrest.conf
|
|
repo1-host-user=[USER-1]
|
|
spool-path=[TEST_PATH]/db-standby/spool
|
|
|
|
+ supplemental file: [TEST_PATH]/backup/pgbackrest.conf
|
|
-------------------------------------------------------
|
|
[db]
|
|
pg1-host=db-primary
|
|
pg1-host-cmd=[BACKREST-BIN]
|
|
pg1-host-config=[TEST_PATH]/db-primary/pgbackrest.conf
|
|
pg1-host-user=[USER-1]
|
|
pg1-path=[TEST_PATH]/db-primary/db/base
|
|
pg1-port=6543
|
|
pg2-host=bogus
|
|
pg2-host-cmd=[BACKREST-BIN]
|
|
pg2-host-config=[TEST_PATH]/db-standby/pgbackrest.conf
|
|
pg2-host-user=[USER-1]
|
|
pg2-path=[TEST_PATH]/db-standby/db/base
|
|
pg8-host=db-standby
|
|
pg8-host-cmd=[BACKREST-BIN]
|
|
pg8-host-config=[TEST_PATH]/db-standby/pgbackrest.conf
|
|
pg8-host-user=[USER-1]
|
|
pg8-path=[TEST_PATH]/db-standby/db/base
|
|
pg8-port=6544
|
|
|
|
[global]
|
|
archive-async=y
|
|
buffer-size=[BUFFER-SIZE]
|
|
compress-level=3
|
|
compress-level-network=1
|
|
compress-type=none
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/backup/lock
|
|
log-level-console=detail
|
|
log-level-file=[LOG-LEVEL-FILE]
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/backup/log
|
|
log-subprocess=[LOG-SUBPROCESS]
|
|
log-timestamp=n
|
|
protocol-timeout=60
|
|
repo1-path=[TEST_PATH]/backup/repo
|
|
|
|
[global:backup]
|
|
archive-copy=y
|
|
start-fast=y
|
|
|
|
stop all stanzas (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf stop
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
stop db stanza (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db stop
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
stanza-delete db - delete stanza with --force when pgbackrest on pg host not accessible (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --force stanza-delete
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
start all stanzas (db-primary host)
|
|
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf start
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
start all stanzas (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf start
|
|
------------------------------------------------------------------------------------------------------------------------------------
|