mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-06 03:53:59 +02:00
11c7c8fabb
This user was created before we tested in containers to ensure isolation between the pg and repo hosts which were then just directories. The downside is that this resulted in a lot of sudos to set the pgbackrest user and to remove files which did not belong to the main test user. Containers provide isolation without needing separate users so we can now safely remove the pgbackrest user. This allows us to remove most sudos, except where they are explicitly needed in tests. While we're at it, remove the code that installed the Perl C library (which also required sudo) and simply add the build path to @INC instead.
351 lines
12 KiB
Plaintext
351 lines
12 KiB
Plaintext
run 005 - bkp 1, sby 1, dst backup, cmp , s3 0, 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
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
full backup - update during backup (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --buffer-size=16384 --type=full --stanza=db backup --test --test-delay=1 --test-point=manifest-build=y
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ supplemental file: [TEST_PATH]/db-master/pgbackrest.conf
|
|
----------------------------------------------------------
|
|
[db]
|
|
pg1-path=[TEST_PATH]/db-master/db/base
|
|
pg1-port=6543
|
|
pg1-socket-path=[TEST_PATH]/db-master/db
|
|
|
|
[global]
|
|
compress=n
|
|
compress-level=3
|
|
compress-level-network=1
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-master/lock
|
|
log-level-console=detail
|
|
log-level-file=trace
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/db-master/log
|
|
log-subprocess=y
|
|
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-master/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]
|
|
compress=n
|
|
compress-level=3
|
|
compress-level-network=1
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-standby/lock
|
|
log-level-console=detail
|
|
log-level-file=trace
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/db-standby/log
|
|
log-subprocess=y
|
|
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-master
|
|
pg1-host-cmd=[BACKREST-BIN]
|
|
pg1-host-config=[TEST_PATH]/db-master/pgbackrest.conf
|
|
pg1-host-user=[USER-1]
|
|
pg1-path=[TEST_PATH]/db-master/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]
|
|
compress=n
|
|
compress-level=3
|
|
compress-level-network=1
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/backup/lock
|
|
log-level-console=detail
|
|
log-level-file=trace
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/backup/log
|
|
log-subprocess=y
|
|
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-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
|
|
-----------------------------------------------------------------
|
|
# Recovery settings generated by pgBackRest restore on [TIMESTAMP]
|
|
primary_conninfo = 'host=db-master 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-master/pgbackrest.conf
|
|
----------------------------------------------------------
|
|
[db]
|
|
pg1-path=[TEST_PATH]/db-master/db/base
|
|
pg1-port=6543
|
|
pg1-socket-path=[TEST_PATH]/db-master/db
|
|
|
|
[global]
|
|
compress=n
|
|
compress-level=3
|
|
compress-level-network=1
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-master/lock
|
|
log-level-console=detail
|
|
log-level-file=trace
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/db-master/log
|
|
log-subprocess=y
|
|
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-master/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]
|
|
compress=n
|
|
compress-level=3
|
|
compress-level-network=1
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-standby/lock
|
|
log-level-console=detail
|
|
log-level-file=trace
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/db-standby/log
|
|
log-subprocess=y
|
|
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-master
|
|
pg1-host-cmd=[BACKREST-BIN]
|
|
pg1-host-config=[TEST_PATH]/db-master/pgbackrest.conf
|
|
pg1-host-user=[USER-1]
|
|
pg1-path=[TEST_PATH]/db-master/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
|
|
compress=n
|
|
compress-level=3
|
|
compress-level-network=1
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/backup/lock
|
|
log-level-console=detail
|
|
log-level-file=trace
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/backup/log
|
|
log-subprocess=y
|
|
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 --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
incr backup - update during backup (backup host)
|
|
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stop-auto --buffer-size=32768 --delta --stanza=db backup --test --test-delay=1 --test-point=manifest-build=y
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ supplemental file: [TEST_PATH]/db-master/pgbackrest.conf
|
|
----------------------------------------------------------
|
|
[db]
|
|
pg1-path=[TEST_PATH]/db-master/db/base
|
|
pg1-port=6543
|
|
pg1-socket-path=[TEST_PATH]/db-master/db
|
|
|
|
[global]
|
|
compress=n
|
|
compress-level=3
|
|
compress-level-network=1
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-master/lock
|
|
log-level-console=detail
|
|
log-level-file=trace
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/db-master/log
|
|
log-subprocess=y
|
|
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-master/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]
|
|
compress=n
|
|
compress-level=3
|
|
compress-level-network=1
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-standby/lock
|
|
log-level-console=detail
|
|
log-level-file=trace
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/db-standby/log
|
|
log-subprocess=y
|
|
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-master
|
|
pg1-host-cmd=[BACKREST-BIN]
|
|
pg1-host-config=[TEST_PATH]/db-master/pgbackrest.conf
|
|
pg1-host-user=[USER-1]
|
|
pg1-path=[TEST_PATH]/db-master/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
|
|
compress=n
|
|
compress-level=3
|
|
compress-level-network=1
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/backup/lock
|
|
log-level-console=detail
|
|
log-level-file=trace
|
|
log-level-stderr=off
|
|
log-path=[TEST_PATH]/backup/log
|
|
log-subprocess=y
|
|
log-timestamp=n
|
|
protocol-timeout=60
|
|
repo1-path=[TEST_PATH]/backup/repo
|
|
|
|
[global:backup]
|
|
archive-copy=y
|
|
start-fast=y
|
|
|
|
restore, type 'default' (db-master host)
|
|
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --buffer-size=16384 --link-all --stanza=db restore
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ supplemental file: [TEST_PATH]/db-master/db/base/recovery.conf
|
|
----------------------------------------------------------------
|
|
# Recovery settings generated by pgBackRest restore on [TIMESTAMP]
|
|
restore_command = '[BACKREST-BIN] --buffer-size=16384 --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
|
|
|
restore, force, backup '[BACKUP-FULL-1]', type 'immediate', target-action=promote (db-master host)
|
|
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --force --set=[BACKUP-FULL-1] --type=immediate --link-all --target-action=promote --stanza=db restore
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ supplemental file: [TEST_PATH]/db-master/db/base/recovery.conf
|
|
----------------------------------------------------------------
|
|
# Recovery settings generated by pgBackRest restore on [TIMESTAMP]
|
|
restore_command = '[BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
|
recovery_target = 'immediate'
|
|
recovery_target_action = 'promote'
|
|
|
|
restore delta, backup '[BACKUP-FULL-1]', type 'time', target '[TIMESTAMP-TARGET-1]', target-action=promote (db-master host)
|
|
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --delta --set=[BACKUP-FULL-1] --type=time --target="[TIMESTAMP-TARGET-1]" --link-all --target-action=promote --stanza=db restore
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ supplemental file: [TEST_PATH]/db-master/db/base/recovery.conf
|
|
----------------------------------------------------------------
|
|
# Recovery settings generated by pgBackRest restore on [TIMESTAMP]
|
|
restore_command = '[BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
|
recovery_target_time = '[TIMESTAMP-TARGET-1]'
|
|
recovery_target_action = 'promote'
|