1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-14 10:13:05 +02:00
pgbackrest/test/expect/real-all-001.log
David Steele 34d649579e
Bundle files in the repository during backup.
Bundle (combine) smaller files during backup to reduce the number of files written to the repository (enable with --bundle). Reducing the number of files is a benefit on all file systems, but especially so on object stores such as S3 that have a high file creation cost. Another benefit is that zero-length files are only stored as metadata in the manifest.

Files are batched up to bundle-size and then compressed/encrypted individually and stored sequentially in the bundle. The bundle id and offset of each file is stored in the manifest so files can be retrieved randomly without needing to read the entire bundle. Files are ordered by timestamp descending when being assigned to bundles to reduce the amount of random access that needs to be done. The idea is that bundles with older files can be read in their entirety on restore and only bundles with newer files will get fragmented.

Bundles are a custom format with metadata stored in the manifest. Tar was considered but it is too limited a format, the major issue being that the size of the file must be known in advance and that is very contrary to how pgBackRest works, especially once we introduce page-level incremental backups.

Bundles are stored numbered in the bundle directory. Some files may still end up in pg_data if they are added after the backup is complete. backup_label is an example.

Currently, only the backup command works in batches. The restore and verify commands use the offsets to pull individual files out of the bundle. It seems better to finalize how this is going to work before optimizing the other commands. Even as is, this is a major step forward, and all commands function with bundling.

One caveat: resume is currently not supported when bundle is enabled.
2022-02-14 13:24:14 -06:00

892 lines
33 KiB
Plaintext

run 001 - bkp 1, sby 1, tls 0, dst backup, cmp none, storage posix, enc 0
=========================================================================
stanza-create db - main create stanza info files (db-primary host)
> [CONTAINER-EXEC] db-primary [BACKREST-BIN] --config=[TEST_PATH]/db-primary/pgbackrest.conf --stanza=db stanza-create
------------------------------------------------------------------------------------------------------------------------------------
check db - verify check command runs successfully (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 check command runs successfully (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --archive-timeout=5 --reset-pg2-host --reset-pg2-host-type --reset-pg2-host-cmd --reset-pg2-host-config --reset-pg2-host-user --reset-pg2-path --stanza=db check
------------------------------------------------------------------------------------------------------------------------------------
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 - repo1 (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]
bundle=y
bundle-size=1MiB
compress-level=3
compress-level-network=1
compress-type=none
db-timeout=45
job-retry=0
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]
repo2-host=backup
repo2-host-cmd=[BACKREST-BIN]
repo2-host-config=[TEST_PATH]/backup/pgbackrest.conf
repo2-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]
bundle=y
bundle-size=1MiB
compress-level=3
compress-level-network=1
compress-type=none
db-timeout=45
job-retry=0
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]
repo2-host=backup
repo2-host-cmd=[BACKREST-BIN]
repo2-host-config=[TEST_PATH]/backup/pgbackrest.conf
repo2-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
pg256-host=db-standby
pg256-host-cmd=[BACKREST-BIN]
pg256-host-config=[TEST_PATH]/db-standby/pgbackrest.conf
pg256-host-user=[USER-1]
pg256-path=[TEST_PATH]/db-standby/db/base
pg256-port=6544
[global]
buffer-size=[BUFFER-SIZE]
bundle=y
bundle-size=1MiB
compress-level=3
compress-level-network=1
compress-type=none
db-timeout=45
job-retry=0
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
repo2-path=[TEST_PATH]/backup/repo2
[global:backup]
archive-copy=y
start-fast=y
full backup - repo2 (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --repo=2 --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]
bundle=y
bundle-size=1MiB
compress-level=3
compress-level-network=1
compress-type=none
db-timeout=45
job-retry=0
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]
repo2-host=backup
repo2-host-cmd=[BACKREST-BIN]
repo2-host-config=[TEST_PATH]/backup/pgbackrest.conf
repo2-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]
bundle=y
bundle-size=1MiB
compress-level=3
compress-level-network=1
compress-type=none
db-timeout=45
job-retry=0
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]
repo2-host=backup
repo2-host-cmd=[BACKREST-BIN]
repo2-host-config=[TEST_PATH]/backup/pgbackrest.conf
repo2-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
pg256-host=db-standby
pg256-host-cmd=[BACKREST-BIN]
pg256-host-config=[TEST_PATH]/db-standby/pgbackrest.conf
pg256-host-user=[USER-1]
pg256-path=[TEST_PATH]/db-standby/db/base
pg256-port=6544
[global]
buffer-size=[BUFFER-SIZE]
bundle=y
bundle-size=1MiB
compress-level=3
compress-level-network=1
compress-type=none
db-timeout=45
job-retry=0
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
repo2-path=[TEST_PATH]/backup/repo2
[global:backup]
archive-copy=y
start-fast=y
full backup - with disabled expire-auto (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --repo1-retention-full=1 --no-expire-auto --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]
bundle=y
bundle-size=1MiB
compress-level=3
compress-level-network=1
compress-type=none
db-timeout=45
job-retry=0
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]
repo2-host=backup
repo2-host-cmd=[BACKREST-BIN]
repo2-host-config=[TEST_PATH]/backup/pgbackrest.conf
repo2-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]
bundle=y
bundle-size=1MiB
compress-level=3
compress-level-network=1
compress-type=none
db-timeout=45
job-retry=0
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]
repo2-host=backup
repo2-host-cmd=[BACKREST-BIN]
repo2-host-config=[TEST_PATH]/backup/pgbackrest.conf
repo2-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
pg256-host=db-standby
pg256-host-cmd=[BACKREST-BIN]
pg256-host-config=[TEST_PATH]/db-standby/pgbackrest.conf
pg256-host-user=[USER-1]
pg256-path=[TEST_PATH]/db-standby/db/base
pg256-port=6544
[global]
buffer-size=[BUFFER-SIZE]
bundle=y
bundle-size=1MiB
compress-level=3
compress-level-network=1
compress-type=none
db-timeout=45
job-retry=0
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
repo2-path=[TEST_PATH]/backup/repo2
[global:backup]
archive-copy=y
start-fast=y
expire full=1 (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --repo1-retention-full=1 --repo=1 --stanza=db expire
------------------------------------------------------------------------------------------------------------------------------------
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 --pg256-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]
bundle=y
bundle-size=1MiB
compress-level=3
compress-level-network=1
compress-type=none
db-timeout=45
job-retry=0
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]
repo2-host=backup
repo2-host-cmd=[BACKREST-BIN]
repo2-host-config=[TEST_PATH]/backup/pgbackrest.conf
repo2-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]
bundle=y
bundle-size=1MiB
compress-level=3
compress-level-network=1
compress-type=none
db-timeout=45
job-retry=0
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]
repo2-host=backup
repo2-host-cmd=[BACKREST-BIN]
repo2-host-config=[TEST_PATH]/backup/pgbackrest.conf
repo2-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
pg256-host=db-standby
pg256-host-cmd=[BACKREST-BIN]
pg256-host-config=[TEST_PATH]/db-standby/pgbackrest.conf
pg256-host-user=[USER-1]
pg256-path=[TEST_PATH]/db-standby/db/base
pg256-port=6544
[global]
archive-async=y
buffer-size=[BUFFER-SIZE]
bundle=y
bundle-size=1MiB
compress-level=3
compress-level-network=1
compress-type=none
db-timeout=45
job-retry=0
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
repo2-path=[TEST_PATH]/backup/repo2
[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-host-type --reset-pg2-host-cmd --reset-pg2-host-config --reset-pg2-host-user --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]
bundle=y
bundle-size=1MiB
compress-level=3
compress-level-network=1
compress-type=none
db-timeout=45
job-retry=0
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]
repo2-host=backup
repo2-host-cmd=[BACKREST-BIN]
repo2-host-config=[TEST_PATH]/backup/pgbackrest.conf
repo2-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]
bundle=y
bundle-size=1MiB
compress-level=3
compress-level-network=1
compress-type=none
db-timeout=45
job-retry=0
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]
repo2-host=backup
repo2-host-cmd=[BACKREST-BIN]
repo2-host-config=[TEST_PATH]/backup/pgbackrest.conf
repo2-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
pg256-host=db-standby
pg256-host-cmd=[BACKREST-BIN]
pg256-host-config=[TEST_PATH]/db-standby/pgbackrest.conf
pg256-host-user=[USER-1]
pg256-path=[TEST_PATH]/db-standby/db/base
pg256-port=6544
[global]
archive-async=y
buffer-size=[BUFFER-SIZE]
bundle=y
bundle-size=1MiB
compress-level=3
compress-level-network=1
compress-type=none
db-timeout=45
job-retry=0
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
repo2-path=[TEST_PATH]/backup/repo2
[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] --repo=1 --stanza=db expire
------------------------------------------------------------------------------------------------------------------------------------
incr backup - delta (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stop-auto --buffer-size=[BUFFER-SIZE] --delta --repo=2 --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]
bundle=y
bundle-size=1MiB
compress-level=3
compress-level-network=1
compress-type=none
db-timeout=45
job-retry=0
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]
repo2-host=backup
repo2-host-cmd=[BACKREST-BIN]
repo2-host-config=[TEST_PATH]/backup/pgbackrest.conf
repo2-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]
bundle=y
bundle-size=1MiB
compress-level=3
compress-level-network=1
compress-type=none
db-timeout=45
job-retry=0
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]
repo2-host=backup
repo2-host-cmd=[BACKREST-BIN]
repo2-host-config=[TEST_PATH]/backup/pgbackrest.conf
repo2-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
pg256-host=db-standby
pg256-host-cmd=[BACKREST-BIN]
pg256-host-config=[TEST_PATH]/db-standby/pgbackrest.conf
pg256-host-user=[USER-1]
pg256-path=[TEST_PATH]/db-standby/db/base
pg256-port=6544
[global]
archive-async=y
buffer-size=[BUFFER-SIZE]
bundle=y
bundle-size=1MiB
compress-level=3
compress-level-network=1
compress-type=none
db-timeout=45
job-retry=0
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
repo2-path=[TEST_PATH]/backup/repo2
[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-host-type --reset-pg2-host-cmd --reset-pg2-host-config --reset-pg2-host-user --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 --repo=2 --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 --repo=2 --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 --repo=2 --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 --repo=2 --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 --repo=2 --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 --repo=2 --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 --repo=2 --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 --repo=2 --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 --repo=2 --stanza=db archive-get %f "%p"'
standby_mode = 'on'
recovery_target_timeline = '4'
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 --repo=1 --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
------------------------------------------------------------------------------------------------------------------------------------