mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +02:00
880fbb5e57
Use checksums rather than timestamps to determine if files have changed. This is useful in cases where the timestamps may not be trustworthy, e.g. when performing an incremental after failing over to a standby. If checksum delta is enabled then checksums will be used for verification of resumed backups, even if they are full. Resumes have always used checksums to verify the files in the repository, enabling delta performs checksums on the database files as well. Note that the user must manually enable this feature in cases were it would be useful or just keep in enabled all the time. A future commit will address automatically enabling the feature in cases where it seems likely to be useful. Contributed by Cynthia Shang.
256 lines
9.9 KiB
Plaintext
256 lines
9.9 KiB
Plaintext
run 002 - bkp 0, sby 1, dst db-master, cmp 0, s3 0, enc 0
|
|
=========================================================
|
|
|
|
stanza-create db - main create stanza info files (db-master host)
|
|
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail stanza-create
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
full backup - update during backup (db-master host)
|
|
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/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
|
|
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
|
|
|
|
[global]
|
|
compress=n
|
|
compress-level=3
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-master/lock
|
|
log-level-console=debug
|
|
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-path=[TEST_PATH]/db-master/repo
|
|
spool-path=[TEST_PATH]/db-master/spool
|
|
|
|
[global:backup]
|
|
archive-copy=y
|
|
start-fast=y
|
|
|
|
+ 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
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-standby/lock
|
|
log-level-console=debug
|
|
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=db-master
|
|
repo1-host-cmd=[BACKREST-BIN]
|
|
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
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ 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"'
|
|
|
|
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
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
full backup - backup from standby (db-master host)
|
|
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/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
|
|
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
|
|
|
|
[global]
|
|
archive-async=y
|
|
compress=n
|
|
compress-level=3
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-master/lock
|
|
log-level-console=debug
|
|
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-path=[TEST_PATH]/db-master/repo
|
|
spool-path=[TEST_PATH]/db-master/spool
|
|
|
|
[global:backup]
|
|
archive-copy=y
|
|
start-fast=y
|
|
|
|
+ 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
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-standby/lock
|
|
log-level-console=debug
|
|
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=db-master
|
|
repo1-host-cmd=[BACKREST-BIN]
|
|
repo1-host-config=[TEST_PATH]/db-master/pgbackrest.conf
|
|
repo1-host-user=[USER-1]
|
|
spool-path=[TEST_PATH]/db-standby/spool
|
|
|
|
check db - confirm standby manifest->build executed (db-standby host)
|
|
> [CONTAINER-EXEC] db-standby [BACKREST-BIN] --config=[TEST_PATH]/db-standby/pgbackrest.conf --log-level-console=detail --archive-timeout=5 --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
check db - verify check command on standby (db-standby host)
|
|
> [CONTAINER-EXEC] db-standby [BACKREST-BIN] --config=[TEST_PATH]/db-standby/pgbackrest.conf --log-level-console=detail --stanza=db check
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
incr backup - update during backup (db-master host)
|
|
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/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
|
|
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
|
|
|
|
[global]
|
|
archive-async=y
|
|
compress=n
|
|
compress-level=3
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-master/lock
|
|
log-level-console=debug
|
|
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-path=[TEST_PATH]/db-master/repo
|
|
spool-path=[TEST_PATH]/db-master/spool
|
|
|
|
[global:backup]
|
|
archive-copy=y
|
|
start-fast=y
|
|
|
|
+ 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
|
|
db-timeout=45
|
|
lock-path=[TEST_PATH]/db-standby/lock
|
|
log-level-console=debug
|
|
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=db-master
|
|
repo1-host-cmd=[BACKREST-BIN]
|
|
repo1-host-config=[TEST_PATH]/db-master/pgbackrest.conf
|
|
repo1-host-user=[USER-1]
|
|
spool-path=[TEST_PATH]/db-standby/spool
|
|
|
|
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
|
|
----------------------------------------------------------------
|
|
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' (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 --stanza=db restore
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ supplemental file: [TEST_PATH]/db-master/db/base/recovery.conf
|
|
----------------------------------------------------------------
|
|
restore_command = '[BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
|
recovery_target = 'immediate'
|
|
|
|
restore delta, backup '[BACKUP-FULL-1]', type 'time', target '[TIMESTAMP-TARGET-1]' (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 --stanza=db restore
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
+ supplemental file: [TEST_PATH]/db-master/db/base/recovery.conf
|
|
----------------------------------------------------------------
|
|
restore_command = '[BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
|
recovery_target_time = '[TIMESTAMP-TARGET-1]'
|