From a10a22127d025367655037c1ca9fee0dde248e3c Mon Sep 17 00:00:00 2001 From: David Steele Date: Thu, 22 Jun 2017 18:51:39 -0400 Subject: [PATCH] Consolidate archive-get test into new archive test. --- doc/xml/release.xml | 2 +- test/expect/archive-get-001.log | 148 -------------- test/expect/archive-get-002.log | 183 ------------------ test/expect/archive-get-003.log | 148 -------------- test/expect/archive-get-004.log | 183 ------------------ test/expect/archive-get-005.log | 150 -------------- test/expect/archive-get-006.log | 181 ----------------- test/expect/archive-get-007.log | 150 -------------- test/expect/archive-get-008.log | 181 ----------------- test/expect/archive-get-009.log | 181 ----------------- test/expect/mock-archive-001.log | 113 ++++++++++- test/expect/mock-archive-002.log | 108 ++++++++++- test/expect/mock-archive-003.log | 32 ++- test/lib/pgBackRestTest/Common/DefineTest.pm | 6 - .../Module/Archive/ArchiveGetTest.pm | 183 ------------------ .../Module/Mock/MockArchiveTest.pm | 105 ++++++++-- 16 files changed, 331 insertions(+), 1723 deletions(-) delete mode 100644 test/expect/archive-get-001.log delete mode 100644 test/expect/archive-get-002.log delete mode 100644 test/expect/archive-get-003.log delete mode 100644 test/expect/archive-get-004.log delete mode 100644 test/expect/archive-get-005.log delete mode 100644 test/expect/archive-get-006.log delete mode 100644 test/expect/archive-get-007.log delete mode 100644 test/expect/archive-get-008.log delete mode 100644 test/expect/archive-get-009.log delete mode 100644 test/lib/pgBackRestTest/Module/Archive/ArchiveGetTest.pm diff --git a/doc/xml/release.xml b/doc/xml/release.xml index df5f27caa..91d80c5c9 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -235,7 +235,7 @@ -

Consolidate archive-push tests into new archive test.

+

Consolidate archive-push and archive-get tests into new archive test.

diff --git a/test/expect/archive-get-001.log b/test/expect/archive-get-001.log deleted file mode 100644 index 0666ebe18..000000000 --- a/test/expect/archive-get-001.log +++ /dev/null @@ -1,148 +0,0 @@ -run 001 - rmt 0, cmp 0, exists 0, s3 0 -====================================== - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db -P00 INFO: get WAL segment 000000010000000100000001 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001, strSourceArchive = 000000010000000100000001 -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [hash], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/repo, strTempExtension = pgbackrest.tmp -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000001, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Archive::Info->new(): bIgnoreMissing = , bLoad = , bRequired = true, strArchiveClusterPath = [TEST_PATH]/db-master/repo/archive/db -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/repo/archive/db/archive.info -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/repo/archive/db/archive.info.copy -P00 ERROR: [055]: unable to open [TEST_PATH]/db-master/repo/archive/db/archive.info or [TEST_PATH]/db-master/repo/archive/db/archive.info.copy -P00 ERROR: [055]: archive.info does not exist but is required to push/get WAL segments - HINT: is archive_command configured in postgresql.conf? - HINT: has a stanza-create been performed? - HINT: use --no-archive-check to disable archive checks during backup if you have an alternate archiving scheme. -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: aborted with exception [055] -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 55 - -stanza-create db - create required data for stanza (db-master host) -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-create ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --lock-path=[TEST_PATH]/db-master/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/db-master/log --no-online --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db -P00 INFO: stanza-create command end: completed successfully - -+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info ---------------------------------------------------------------------- -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-catalog-version=201409291 -db-control-version=942 -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-catalog-version":201409291,"db-control-version":942,"db-system-id":6353949018581704918,"db-version":"9.4"} - -+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info ------------------------------------------------------------------------ -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-id":6353949018581704918,"db-version":"9.4"} - -+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info ------------------------------------------------------------------------ -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-id":6353949018581704918,"db-version":"9.4"} - -stop all stanzas (db-master host) -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf stop ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: stop command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --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 --repo-path=[TEST_PATH]/db-master/repo -P00 DEBUG: Storage::Local->pathCreate(): bCreateParent = true, bIgnoreExists = true, strMode = 770, strPathExp = [TEST_PATH]/db-master/lock -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: stop command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000090000000900000009 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db -P00 INFO: get WAL segment 000000090000000900000009 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG, strSourceArchive = 000000090000000900000009 -P00 ERROR: [062]: stop file exists for all stanzas -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: aborted with exception [062] -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 62 - -start all stanzas (db-master host) -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf start ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: start command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --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 --repo-path=[TEST_PATH]/db-master/repo -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: start command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000090000000900000009 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db -P00 INFO: get WAL segment 000000090000000900000009 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG, strSourceArchive = 000000090000000900000009 -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [hash], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/repo, strTempExtension = pgbackrest.tmp -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000090000000900000009, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Archive::Info->new(): bIgnoreMissing = , bLoad = , bRequired = true, strArchiveClusterPath = [TEST_PATH]/db-master/repo/archive/db -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/repo/archive/db/archive.info -P00 DEBUG: Archive::Info->check(): bRequired = , strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Archive::Info->archiveId(): strDbVersion = [undef], ullDbSysId = [undef] -P00 DEBUG: Archive::Info->archiveId=>: strArchiveId = 9.4-1 -P00 DEBUG: Archive::Info->check=>: strArchiveId = 9.4-1 -P00 DEBUG: Archive::Common::walSegmentFind(): iWaitSeconds = [undef], oStorageRepo = [object], strArchiveId = 9.4-1, strWalSegment = 000000090000000900000009 -P00 DEBUG: Storage::Local->list(): bIgnoreMissing = true, strExpression = ^000000090000000900000009-[0-f]{40}(\.gz){0,1}$, strPathExp = /9.4-1/0000000900000009, strSortOrder = -P00 DEBUG: Storage::Local->list=>: stryFileList = () -P00 DEBUG: Archive::Common::walSegmentFind=>: strWalFileName = [undef] -P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = [undef], strArchiveId = 9.4-1 -P00 INFO: unable to find 000000090000000900000009 in the archive -P00 DEBUG: Archive::Get::Get->get=>: iResult = 1 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 1, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 1 diff --git a/test/expect/archive-get-002.log b/test/expect/archive-get-002.log deleted file mode 100644 index d9ead565c..000000000 --- a/test/expect/archive-get-002.log +++ /dev/null @@ -1,183 +0,0 @@ -run 002 - rmt 0, cmp 0, exists 1, s3 0 -====================================== - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db -P00 INFO: get WAL segment 000000010000000100000001 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001, strSourceArchive = 000000010000000100000001 -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [hash], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/repo, strTempExtension = pgbackrest.tmp -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000001, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Archive::Info->new(): bIgnoreMissing = , bLoad = , bRequired = true, strArchiveClusterPath = [TEST_PATH]/db-master/repo/archive/db -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/repo/archive/db/archive.info -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/repo/archive/db/archive.info.copy -P00 ERROR: [055]: unable to open [TEST_PATH]/db-master/repo/archive/db/archive.info or [TEST_PATH]/db-master/repo/archive/db/archive.info.copy -P00 ERROR: [055]: archive.info does not exist but is required to push/get WAL segments - HINT: is archive_command configured in postgresql.conf? - HINT: has a stanza-create been performed? - HINT: use --no-archive-check to disable archive checks during backup if you have an alternate archiving scheme. -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: aborted with exception [055] -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 55 - -stanza-create db - create required data for stanza (db-master host) -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-create ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --lock-path=[TEST_PATH]/db-master/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/db-master/log --no-online --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db -P00 INFO: stanza-create command end: completed successfully - -+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info ---------------------------------------------------------------------- -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-catalog-version=201409291 -db-control-version=942 -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-catalog-version":201409291,"db-control-version":942,"db-system-id":6353949018581704918,"db-version":"9.4"} - -+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info ------------------------------------------------------------------------ -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-id":6353949018581704918,"db-version":"9.4"} - -+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info ------------------------------------------------------------------------ -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-id":6353949018581704918,"db-version":"9.4"} - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db -P00 INFO: get WAL segment 000000010000000100000001 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001, strSourceArchive = 000000010000000100000001 -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [hash], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/repo, strTempExtension = pgbackrest.tmp -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000001, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Archive::Info->new(): bIgnoreMissing = , bLoad = , bRequired = true, strArchiveClusterPath = [TEST_PATH]/db-master/repo/archive/db -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/repo/archive/db/archive.info -P00 DEBUG: Archive::Info->check(): bRequired = , strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Archive::Info->archiveId(): strDbVersion = [undef], ullDbSysId = [undef] -P00 DEBUG: Archive::Info->archiveId=>: strArchiveId = 9.4-1 -P00 DEBUG: Archive::Info->check=>: strArchiveId = 9.4-1 -P00 DEBUG: Archive::Common::walSegmentFind(): iWaitSeconds = [undef], oStorageRepo = [object], strArchiveId = 9.4-1, strWalSegment = 000000010000000100000001 -P00 DEBUG: Storage::Local->list(): bIgnoreMissing = true, strExpression = ^000000010000000100000001-[0-f]{40}(\.gz){0,1}$, strPathExp = /9.4-1/0000000100000001, strSortOrder = -P00 DEBUG: Storage::Local->list=>: stryFileList = (000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7) -P00 DEBUG: Archive::Common::walSegmentFind=>: strWalFileName = 000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7 -P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = 000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7, strArchiveId = 9.4-1 -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = , rhyFilter = [undef], xFileExp = /9.4-1/000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7 -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [undef], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp -P00 DEBUG: Storage::Local->openWrite(): bAtomic = , bPathCreate = , lTimestamp = [undef], rhyFilter = [undef], strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 -P00 DEBUG: Storage::Base->copy(): xDestinationFile = [object], xSourceFile = [object] -P00 DEBUG: Archive::Get::Get->get=>: iResult = 0 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000002 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db -P00 INFO: get WAL segment 000000010000000100000002 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002, strSourceArchive = 000000010000000100000002 -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [hash], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/repo, strTempExtension = pgbackrest.tmp -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000002, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Archive::Info->new(): bIgnoreMissing = , bLoad = , bRequired = true, strArchiveClusterPath = [TEST_PATH]/db-master/repo/archive/db -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/repo/archive/db/archive.info -P00 DEBUG: Archive::Info->check(): bRequired = , strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Archive::Info->archiveId(): strDbVersion = [undef], ullDbSysId = [undef] -P00 DEBUG: Archive::Info->archiveId=>: strArchiveId = 9.4-1 -P00 DEBUG: Archive::Info->check=>: strArchiveId = 9.4-1 -P00 DEBUG: Archive::Common::walSegmentFind(): iWaitSeconds = [undef], oStorageRepo = [object], strArchiveId = 9.4-1, strWalSegment = 000000010000000100000002 -P00 DEBUG: Storage::Local->list(): bIgnoreMissing = true, strExpression = ^000000010000000100000002-[0-f]{40}(\.gz){0,1}$, strPathExp = /9.4-1/0000000100000001, strSortOrder = -P00 DEBUG: Storage::Local->list=>: stryFileList = (000000010000000100000002-72b9da071c13957fb4ca31f05dbd5c644297c2f7) -P00 DEBUG: Archive::Common::walSegmentFind=>: strWalFileName = 000000010000000100000002-72b9da071c13957fb4ca31f05dbd5c644297c2f7 -P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = 000000010000000100000002-72b9da071c13957fb4ca31f05dbd5c644297c2f7, strArchiveId = 9.4-1 -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = , rhyFilter = [undef], xFileExp = /9.4-1/000000010000000100000002-72b9da071c13957fb4ca31f05dbd5c644297c2f7 -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [undef], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp -P00 DEBUG: Storage::Local->openWrite(): bAtomic = , bPathCreate = , lTimestamp = [undef], rhyFilter = [undef], strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002 -P00 DEBUG: Storage::Base->copy(): xDestinationFile = [object], xSourceFile = [object] -P00 DEBUG: Archive::Get::Get->get=>: iResult = 0 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000003 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000003 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db -P00 INFO: get WAL segment 000000010000000100000003 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000003, strSourceArchive = 000000010000000100000003 -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [hash], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/repo, strTempExtension = pgbackrest.tmp -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000003, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Archive::Info->new(): bIgnoreMissing = , bLoad = , bRequired = true, strArchiveClusterPath = [TEST_PATH]/db-master/repo/archive/db -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/repo/archive/db/archive.info -P00 DEBUG: Archive::Info->check(): bRequired = , strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Archive::Info->archiveId(): strDbVersion = [undef], ullDbSysId = [undef] -P00 DEBUG: Archive::Info->archiveId=>: strArchiveId = 9.4-1 -P00 DEBUG: Archive::Info->check=>: strArchiveId = 9.4-1 -P00 DEBUG: Archive::Common::walSegmentFind(): iWaitSeconds = [undef], oStorageRepo = [object], strArchiveId = 9.4-1, strWalSegment = 000000010000000100000003 -P00 DEBUG: Storage::Local->list(): bIgnoreMissing = true, strExpression = ^000000010000000100000003-[0-f]{40}(\.gz){0,1}$, strPathExp = /9.4-1/0000000100000001, strSortOrder = -P00 DEBUG: Storage::Local->list=>: stryFileList = (000000010000000100000003-72b9da071c13957fb4ca31f05dbd5c644297c2f7) -P00 DEBUG: Archive::Common::walSegmentFind=>: strWalFileName = 000000010000000100000003-72b9da071c13957fb4ca31f05dbd5c644297c2f7 -P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = 000000010000000100000003-72b9da071c13957fb4ca31f05dbd5c644297c2f7, strArchiveId = 9.4-1 -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = , rhyFilter = [undef], xFileExp = /9.4-1/000000010000000100000003-72b9da071c13957fb4ca31f05dbd5c644297c2f7 -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [undef], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp -P00 DEBUG: Storage::Local->openWrite(): bAtomic = , bPathCreate = , lTimestamp = [undef], rhyFilter = [undef], strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000003 -P00 DEBUG: Storage::Base->copy(): xDestinationFile = [object], xSourceFile = [object] -P00 DEBUG: Archive::Get::Get->get=>: iResult = 0 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 diff --git a/test/expect/archive-get-003.log b/test/expect/archive-get-003.log deleted file mode 100644 index 062c72aee..000000000 --- a/test/expect/archive-get-003.log +++ /dev/null @@ -1,148 +0,0 @@ -run 003 - rmt 0, cmp 1, exists 0, s3 0 -====================================== - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db -P00 INFO: get WAL segment 000000010000000100000001 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001, strSourceArchive = 000000010000000100000001 -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [hash], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/repo, strTempExtension = pgbackrest.tmp -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000001, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Archive::Info->new(): bIgnoreMissing = , bLoad = , bRequired = true, strArchiveClusterPath = [TEST_PATH]/db-master/repo/archive/db -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/repo/archive/db/archive.info -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/repo/archive/db/archive.info.copy -P00 ERROR: [055]: unable to open [TEST_PATH]/db-master/repo/archive/db/archive.info or [TEST_PATH]/db-master/repo/archive/db/archive.info.copy -P00 ERROR: [055]: archive.info does not exist but is required to push/get WAL segments - HINT: is archive_command configured in postgresql.conf? - HINT: has a stanza-create been performed? - HINT: use --no-archive-check to disable archive checks during backup if you have an alternate archiving scheme. -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: aborted with exception [055] -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 55 - -stanza-create db - create required data for stanza (db-master host) -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-create ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --lock-path=[TEST_PATH]/db-master/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/db-master/log --no-online --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db -P00 INFO: stanza-create command end: completed successfully - -+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info ---------------------------------------------------------------------- -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-catalog-version=201409291 -db-control-version=942 -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-catalog-version":201409291,"db-control-version":942,"db-system-id":6353949018581704918,"db-version":"9.4"} - -+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info ------------------------------------------------------------------------ -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-id":6353949018581704918,"db-version":"9.4"} - -+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info ------------------------------------------------------------------------ -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-id":6353949018581704918,"db-version":"9.4"} - -stop all stanzas (db-master host) -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf stop ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: stop command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --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 --repo-path=[TEST_PATH]/db-master/repo -P00 DEBUG: Storage::Local->pathCreate(): bCreateParent = true, bIgnoreExists = true, strMode = 770, strPathExp = [TEST_PATH]/db-master/lock -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: stop command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000090000000900000009 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db -P00 INFO: get WAL segment 000000090000000900000009 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG, strSourceArchive = 000000090000000900000009 -P00 ERROR: [062]: stop file exists for all stanzas -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: aborted with exception [062] -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 62 - -start all stanzas (db-master host) -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf start ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: start command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --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 --repo-path=[TEST_PATH]/db-master/repo -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: start command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000090000000900000009 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db -P00 INFO: get WAL segment 000000090000000900000009 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG, strSourceArchive = 000000090000000900000009 -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [hash], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/repo, strTempExtension = pgbackrest.tmp -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000090000000900000009, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Archive::Info->new(): bIgnoreMissing = , bLoad = , bRequired = true, strArchiveClusterPath = [TEST_PATH]/db-master/repo/archive/db -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/repo/archive/db/archive.info -P00 DEBUG: Archive::Info->check(): bRequired = , strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Archive::Info->archiveId(): strDbVersion = [undef], ullDbSysId = [undef] -P00 DEBUG: Archive::Info->archiveId=>: strArchiveId = 9.4-1 -P00 DEBUG: Archive::Info->check=>: strArchiveId = 9.4-1 -P00 DEBUG: Archive::Common::walSegmentFind(): iWaitSeconds = [undef], oStorageRepo = [object], strArchiveId = 9.4-1, strWalSegment = 000000090000000900000009 -P00 DEBUG: Storage::Local->list(): bIgnoreMissing = true, strExpression = ^000000090000000900000009-[0-f]{40}(\.gz){0,1}$, strPathExp = /9.4-1/0000000900000009, strSortOrder = -P00 DEBUG: Storage::Local->list=>: stryFileList = () -P00 DEBUG: Archive::Common::walSegmentFind=>: strWalFileName = [undef] -P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = [undef], strArchiveId = 9.4-1 -P00 INFO: unable to find 000000090000000900000009 in the archive -P00 DEBUG: Archive::Get::Get->get=>: iResult = 1 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 1, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 1 diff --git a/test/expect/archive-get-004.log b/test/expect/archive-get-004.log deleted file mode 100644 index 5a315336a..000000000 --- a/test/expect/archive-get-004.log +++ /dev/null @@ -1,183 +0,0 @@ -run 004 - rmt 0, cmp 1, exists 1, s3 0 -====================================== - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db -P00 INFO: get WAL segment 000000010000000100000001 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001, strSourceArchive = 000000010000000100000001 -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [hash], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/repo, strTempExtension = pgbackrest.tmp -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000001, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Archive::Info->new(): bIgnoreMissing = , bLoad = , bRequired = true, strArchiveClusterPath = [TEST_PATH]/db-master/repo/archive/db -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/repo/archive/db/archive.info -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/repo/archive/db/archive.info.copy -P00 ERROR: [055]: unable to open [TEST_PATH]/db-master/repo/archive/db/archive.info or [TEST_PATH]/db-master/repo/archive/db/archive.info.copy -P00 ERROR: [055]: archive.info does not exist but is required to push/get WAL segments - HINT: is archive_command configured in postgresql.conf? - HINT: has a stanza-create been performed? - HINT: use --no-archive-check to disable archive checks during backup if you have an alternate archiving scheme. -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: aborted with exception [055] -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 55 - -stanza-create db - create required data for stanza (db-master host) -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-create ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --lock-path=[TEST_PATH]/db-master/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/db-master/log --no-online --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db -P00 INFO: stanza-create command end: completed successfully - -+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info ---------------------------------------------------------------------- -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-catalog-version=201409291 -db-control-version=942 -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-catalog-version":201409291,"db-control-version":942,"db-system-id":6353949018581704918,"db-version":"9.4"} - -+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info ------------------------------------------------------------------------ -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-id":6353949018581704918,"db-version":"9.4"} - -+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info ------------------------------------------------------------------------ -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-id":6353949018581704918,"db-version":"9.4"} - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db -P00 INFO: get WAL segment 000000010000000100000001 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001, strSourceArchive = 000000010000000100000001 -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [hash], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/repo, strTempExtension = pgbackrest.tmp -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000001, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Archive::Info->new(): bIgnoreMissing = , bLoad = , bRequired = true, strArchiveClusterPath = [TEST_PATH]/db-master/repo/archive/db -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/repo/archive/db/archive.info -P00 DEBUG: Archive::Info->check(): bRequired = , strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Archive::Info->archiveId(): strDbVersion = [undef], ullDbSysId = [undef] -P00 DEBUG: Archive::Info->archiveId=>: strArchiveId = 9.4-1 -P00 DEBUG: Archive::Info->check=>: strArchiveId = 9.4-1 -P00 DEBUG: Archive::Common::walSegmentFind(): iWaitSeconds = [undef], oStorageRepo = [object], strArchiveId = 9.4-1, strWalSegment = 000000010000000100000001 -P00 DEBUG: Storage::Local->list(): bIgnoreMissing = true, strExpression = ^000000010000000100000001-[0-f]{40}(\.gz){0,1}$, strPathExp = /9.4-1/0000000100000001, strSortOrder = -P00 DEBUG: Storage::Local->list=>: stryFileList = (000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz) -P00 DEBUG: Archive::Common::walSegmentFind=>: strWalFileName = 000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz -P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = 000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz, strArchiveId = 9.4-1 -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = , rhyFilter = [undef], xFileExp = /9.4-1/000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [undef], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp -P00 DEBUG: Storage::Local->openWrite(): bAtomic = , bPathCreate = , lTimestamp = [undef], rhyFilter = ({rxyParam => ({strCompressType => decompress}), strClass => pgBackRest::Storage::Filter::Gzip}), strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 -P00 DEBUG: Storage::Base->copy(): xDestinationFile = [object], xSourceFile = [object] -P00 DEBUG: Archive::Get::Get->get=>: iResult = 0 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000002 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db -P00 INFO: get WAL segment 000000010000000100000002 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002, strSourceArchive = 000000010000000100000002 -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [hash], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/repo, strTempExtension = pgbackrest.tmp -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000002, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Archive::Info->new(): bIgnoreMissing = , bLoad = , bRequired = true, strArchiveClusterPath = [TEST_PATH]/db-master/repo/archive/db -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/repo/archive/db/archive.info -P00 DEBUG: Archive::Info->check(): bRequired = , strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Archive::Info->archiveId(): strDbVersion = [undef], ullDbSysId = [undef] -P00 DEBUG: Archive::Info->archiveId=>: strArchiveId = 9.4-1 -P00 DEBUG: Archive::Info->check=>: strArchiveId = 9.4-1 -P00 DEBUG: Archive::Common::walSegmentFind(): iWaitSeconds = [undef], oStorageRepo = [object], strArchiveId = 9.4-1, strWalSegment = 000000010000000100000002 -P00 DEBUG: Storage::Local->list(): bIgnoreMissing = true, strExpression = ^000000010000000100000002-[0-f]{40}(\.gz){0,1}$, strPathExp = /9.4-1/0000000100000001, strSortOrder = -P00 DEBUG: Storage::Local->list=>: stryFileList = (000000010000000100000002-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz) -P00 DEBUG: Archive::Common::walSegmentFind=>: strWalFileName = 000000010000000100000002-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz -P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = 000000010000000100000002-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz, strArchiveId = 9.4-1 -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = , rhyFilter = [undef], xFileExp = /9.4-1/000000010000000100000002-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [undef], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp -P00 DEBUG: Storage::Local->openWrite(): bAtomic = , bPathCreate = , lTimestamp = [undef], rhyFilter = ({rxyParam => ({strCompressType => decompress}), strClass => pgBackRest::Storage::Filter::Gzip}), strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002 -P00 DEBUG: Storage::Base->copy(): xDestinationFile = [object], xSourceFile = [object] -P00 DEBUG: Archive::Get::Get->get=>: iResult = 0 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000003 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000003 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db -P00 INFO: get WAL segment 000000010000000100000003 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000003, strSourceArchive = 000000010000000100000003 -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [hash], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/repo, strTempExtension = pgbackrest.tmp -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000003, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Archive::Info->new(): bIgnoreMissing = , bLoad = , bRequired = true, strArchiveClusterPath = [TEST_PATH]/db-master/repo/archive/db -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/repo/archive/db/archive.info -P00 DEBUG: Archive::Info->check(): bRequired = , strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Archive::Info->archiveId(): strDbVersion = [undef], ullDbSysId = [undef] -P00 DEBUG: Archive::Info->archiveId=>: strArchiveId = 9.4-1 -P00 DEBUG: Archive::Info->check=>: strArchiveId = 9.4-1 -P00 DEBUG: Archive::Common::walSegmentFind(): iWaitSeconds = [undef], oStorageRepo = [object], strArchiveId = 9.4-1, strWalSegment = 000000010000000100000003 -P00 DEBUG: Storage::Local->list(): bIgnoreMissing = true, strExpression = ^000000010000000100000003-[0-f]{40}(\.gz){0,1}$, strPathExp = /9.4-1/0000000100000001, strSortOrder = -P00 DEBUG: Storage::Local->list=>: stryFileList = (000000010000000100000003-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz) -P00 DEBUG: Archive::Common::walSegmentFind=>: strWalFileName = 000000010000000100000003-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz -P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = 000000010000000100000003-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz, strArchiveId = 9.4-1 -P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = , rhyFilter = [undef], xFileExp = /9.4-1/000000010000000100000003-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [undef], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp -P00 DEBUG: Storage::Local->openWrite(): bAtomic = , bPathCreate = , lTimestamp = [undef], rhyFilter = ({rxyParam => ({strCompressType => decompress}), strClass => pgBackRest::Storage::Filter::Gzip}), strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000003 -P00 DEBUG: Storage::Base->copy(): xDestinationFile = [object], xSourceFile = [object] -P00 DEBUG: Archive::Get::Get->get=>: iResult = 0 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 diff --git a/test/expect/archive-get-005.log b/test/expect/archive-get-005.log deleted file mode 100644 index 934ea55b2..000000000 --- a/test/expect/archive-get-005.log +++ /dev/null @@ -1,150 +0,0 @@ -run 005 - rmt 1, cmp 0, exists 0, s3 0 -====================================== - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db -P00 INFO: get WAL segment 000000010000000100000001 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001, strSourceArchive = 000000010000000100000001 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: create (cached) remote protocol -P00 DEBUG: Protocol::Remote::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = [BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote, strCommandSSH = ssh, strHost = backup, strUser = [USER-1] -P00 DEBUG: Protocol::Command::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = ssh -o LogLevel=error -o Compression=no -o PasswordAuthentication=no backrest@backup '[BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote', strId = 'backup remote', strName = remote -P00 DEBUG: Protocol::Storage::Remote->new(): oProtocol = [object] -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000001, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol -P00 ERROR: [055]: raised on 'backup remote' host: archive.info does not exist but is required to push/get WAL segments - HINT: is archive_command configured in postgresql.conf? - HINT: has a stanza-create been performed? - HINT: use --no-archive-check to disable archive checks during backup if you have an alternate archiving scheme. -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup -P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: aborted with exception [055] -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 55 - -stanza-create db - create required data for stanza (backup host) -> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-create ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --db-user=[USER-2] --lock-path=[TEST_PATH]/backup/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/backup/log --no-online --protocol-timeout=60 --repo-path=[TEST_PATH]/backup/repo --stanza=db -P00 INFO: stanza-create command end: completed successfully - -+ supplemental file: [TEST_PATH]/backup/repo/backup/db/backup.info ------------------------------------------------------------------- -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-catalog-version=201409291 -db-control-version=942 -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-catalog-version":201409291,"db-control-version":942,"db-system-id":6353949018581704918,"db-version":"9.4"} - -+ supplemental file: [TEST_PATH]/backup/repo/archive/db/archive.info --------------------------------------------------------------------- -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-id":6353949018581704918,"db-version":"9.4"} - -+ supplemental file: [TEST_PATH]/backup/repo/archive/db/archive.info --------------------------------------------------------------------- -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-id":6353949018581704918,"db-version":"9.4"} - -stop all stanzas (db-master host) -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf stop ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: stop command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --config=[TEST_PATH]/db-master/pgbackrest.conf --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 -P00 DEBUG: Storage::Local->pathCreate(): bCreateParent = true, bIgnoreExists = true, strMode = 770, strPathExp = [TEST_PATH]/db-master/lock -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: stop command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000090000000900000009 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db -P00 INFO: get WAL segment 000000090000000900000009 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG, strSourceArchive = 000000090000000900000009 -P00 ERROR: [062]: stop file exists for all stanzas -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: aborted with exception [062] -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 62 - -start all stanzas (db-master host) -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf start ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: start command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --config=[TEST_PATH]/db-master/pgbackrest.conf --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 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: start command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000090000000900000009 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db -P00 INFO: get WAL segment 000000090000000900000009 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG, strSourceArchive = 000000090000000900000009 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: create (cached) remote protocol -P00 DEBUG: Protocol::Remote::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = [BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote, strCommandSSH = ssh, strHost = backup, strUser = [USER-1] -P00 DEBUG: Protocol::Command::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = ssh -o LogLevel=error -o Compression=no -o PasswordAuthentication=no backrest@backup '[BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote', strId = 'backup remote', strName = remote -P00 DEBUG: Protocol::Storage::Remote->new(): oProtocol = [object] -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000090000000900000009, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol -P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = [undef], strArchiveId = 9.4-1 -P00 INFO: unable to find 000000090000000900000009 in the archive -P00 DEBUG: Archive::Get::Get->get=>: iResult = 1 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 1, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup -P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 1 diff --git a/test/expect/archive-get-006.log b/test/expect/archive-get-006.log deleted file mode 100644 index 8a7637ddd..000000000 --- a/test/expect/archive-get-006.log +++ /dev/null @@ -1,181 +0,0 @@ -run 006 - rmt 1, cmp 0, exists 1, s3 0 -====================================== - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db -P00 INFO: get WAL segment 000000010000000100000001 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001, strSourceArchive = 000000010000000100000001 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: create (cached) remote protocol -P00 DEBUG: Protocol::Remote::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = [BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote, strCommandSSH = ssh, strHost = backup, strUser = [USER-1] -P00 DEBUG: Protocol::Command::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = ssh -o LogLevel=error -o Compression=no -o PasswordAuthentication=no backrest@backup '[BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote', strId = 'backup remote', strName = remote -P00 DEBUG: Protocol::Storage::Remote->new(): oProtocol = [object] -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000001, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol -P00 ERROR: [055]: raised on 'backup remote' host: archive.info does not exist but is required to push/get WAL segments - HINT: is archive_command configured in postgresql.conf? - HINT: has a stanza-create been performed? - HINT: use --no-archive-check to disable archive checks during backup if you have an alternate archiving scheme. -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup -P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: aborted with exception [055] -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 55 - -stanza-create db - create required data for stanza (backup host) -> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-create ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --db-user=[USER-2] --lock-path=[TEST_PATH]/backup/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/backup/log --no-online --protocol-timeout=60 --repo-path=[TEST_PATH]/backup/repo --stanza=db -P00 INFO: stanza-create command end: completed successfully - -+ supplemental file: [TEST_PATH]/backup/repo/backup/db/backup.info ------------------------------------------------------------------- -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-catalog-version=201409291 -db-control-version=942 -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-catalog-version":201409291,"db-control-version":942,"db-system-id":6353949018581704918,"db-version":"9.4"} - -+ supplemental file: [TEST_PATH]/backup/repo/archive/db/archive.info --------------------------------------------------------------------- -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-id":6353949018581704918,"db-version":"9.4"} - -+ supplemental file: [TEST_PATH]/backup/repo/archive/db/archive.info --------------------------------------------------------------------- -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-id":6353949018581704918,"db-version":"9.4"} - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get --cmd-ssh=/usr/bin/ssh 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --cmd-ssh=/usr/bin/ssh --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db -P00 INFO: get WAL segment 000000010000000100000001 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001, strSourceArchive = 000000010000000100000001 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: create (cached) remote protocol -P00 DEBUG: Protocol::Remote::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = [BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote, strCommandSSH = /usr/bin/ssh, strHost = backup, strUser = [USER-1] -P00 DEBUG: Protocol::Command::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = /usr/bin/ssh -o LogLevel=error -o Compression=no -o PasswordAuthentication=no backrest@backup '[BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote', strId = 'backup remote', strName = remote -P00 DEBUG: Protocol::Storage::Remote->new(): oProtocol = [object] -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000001, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol -P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = 000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7, strArchiveId = 9.4-1 -P00 DEBUG: Protocol::Storage::Remote->openRead(): rhParam = [hash], strFileExp = /9.4-1/000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7 -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [undef], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp -P00 DEBUG: Storage::Local->openWrite(): bAtomic = , bPathCreate = , lTimestamp = [undef], rhyFilter = [undef], strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 -P00 DEBUG: Storage::Base->copy(): xDestinationFile = [object], xSourceFile = [object] -P00 DEBUG: Archive::Get::Get->get=>: iResult = 0 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup -P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000002 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db -P00 INFO: get WAL segment 000000010000000100000002 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002, strSourceArchive = 000000010000000100000002 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: create (cached) remote protocol -P00 DEBUG: Protocol::Remote::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = [BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote, strCommandSSH = ssh, strHost = backup, strUser = [USER-1] -P00 DEBUG: Protocol::Command::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = ssh -o LogLevel=error -o Compression=no -o PasswordAuthentication=no backrest@backup '[BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote', strId = 'backup remote', strName = remote -P00 DEBUG: Protocol::Storage::Remote->new(): oProtocol = [object] -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000002, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol -P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = 000000010000000100000002-72b9da071c13957fb4ca31f05dbd5c644297c2f7, strArchiveId = 9.4-1 -P00 DEBUG: Protocol::Storage::Remote->openRead(): rhParam = [hash], strFileExp = /9.4-1/000000010000000100000002-72b9da071c13957fb4ca31f05dbd5c644297c2f7 -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [undef], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp -P00 DEBUG: Storage::Local->openWrite(): bAtomic = , bPathCreate = , lTimestamp = [undef], rhyFilter = [undef], strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002 -P00 DEBUG: Storage::Base->copy(): xDestinationFile = [object], xSourceFile = [object] -P00 DEBUG: Archive::Get::Get->get=>: iResult = 0 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup -P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000003 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000003 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db -P00 INFO: get WAL segment 000000010000000100000003 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000003, strSourceArchive = 000000010000000100000003 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: create (cached) remote protocol -P00 DEBUG: Protocol::Remote::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = [BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote, strCommandSSH = ssh, strHost = backup, strUser = [USER-1] -P00 DEBUG: Protocol::Command::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = ssh -o LogLevel=error -o Compression=no -o PasswordAuthentication=no backrest@backup '[BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote', strId = 'backup remote', strName = remote -P00 DEBUG: Protocol::Storage::Remote->new(): oProtocol = [object] -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000003, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol -P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = 000000010000000100000003-72b9da071c13957fb4ca31f05dbd5c644297c2f7, strArchiveId = 9.4-1 -P00 DEBUG: Protocol::Storage::Remote->openRead(): rhParam = [hash], strFileExp = /9.4-1/000000010000000100000003-72b9da071c13957fb4ca31f05dbd5c644297c2f7 -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [undef], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp -P00 DEBUG: Storage::Local->openWrite(): bAtomic = , bPathCreate = , lTimestamp = [undef], rhyFilter = [undef], strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000003 -P00 DEBUG: Storage::Base->copy(): xDestinationFile = [object], xSourceFile = [object] -P00 DEBUG: Archive::Get::Get->get=>: iResult = 0 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup -P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 diff --git a/test/expect/archive-get-007.log b/test/expect/archive-get-007.log deleted file mode 100644 index ed38e5e48..000000000 --- a/test/expect/archive-get-007.log +++ /dev/null @@ -1,150 +0,0 @@ -run 007 - rmt 1, cmp 1, exists 0, s3 0 -====================================== - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db -P00 INFO: get WAL segment 000000010000000100000001 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001, strSourceArchive = 000000010000000100000001 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: create (cached) remote protocol -P00 DEBUG: Protocol::Remote::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = [BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote, strCommandSSH = ssh, strHost = backup, strUser = [USER-1] -P00 DEBUG: Protocol::Command::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = ssh -o LogLevel=error -o Compression=no -o PasswordAuthentication=no backrest@backup '[BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote', strId = 'backup remote', strName = remote -P00 DEBUG: Protocol::Storage::Remote->new(): oProtocol = [object] -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000001, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol -P00 ERROR: [055]: raised on 'backup remote' host: archive.info does not exist but is required to push/get WAL segments - HINT: is archive_command configured in postgresql.conf? - HINT: has a stanza-create been performed? - HINT: use --no-archive-check to disable archive checks during backup if you have an alternate archiving scheme. -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup -P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: aborted with exception [055] -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 55 - -stanza-create db - create required data for stanza (backup host) -> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-create ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --db-user=[USER-2] --lock-path=[TEST_PATH]/backup/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/backup/log --no-online --protocol-timeout=60 --repo-path=[TEST_PATH]/backup/repo --stanza=db -P00 INFO: stanza-create command end: completed successfully - -+ supplemental file: [TEST_PATH]/backup/repo/backup/db/backup.info ------------------------------------------------------------------- -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-catalog-version=201409291 -db-control-version=942 -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-catalog-version":201409291,"db-control-version":942,"db-system-id":6353949018581704918,"db-version":"9.4"} - -+ supplemental file: [TEST_PATH]/backup/repo/archive/db/archive.info --------------------------------------------------------------------- -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-id":6353949018581704918,"db-version":"9.4"} - -+ supplemental file: [TEST_PATH]/backup/repo/archive/db/archive.info --------------------------------------------------------------------- -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-id":6353949018581704918,"db-version":"9.4"} - -stop all stanzas (db-master host) -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf stop ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: stop command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --config=[TEST_PATH]/db-master/pgbackrest.conf --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 -P00 DEBUG: Storage::Local->pathCreate(): bCreateParent = true, bIgnoreExists = true, strMode = 770, strPathExp = [TEST_PATH]/db-master/lock -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: stop command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000090000000900000009 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db -P00 INFO: get WAL segment 000000090000000900000009 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG, strSourceArchive = 000000090000000900000009 -P00 ERROR: [062]: stop file exists for all stanzas -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: aborted with exception [062] -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 62 - -start all stanzas (db-master host) -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf start ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: start command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --config=[TEST_PATH]/db-master/pgbackrest.conf --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 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: start command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000090000000900000009 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db -P00 INFO: get WAL segment 000000090000000900000009 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG, strSourceArchive = 000000090000000900000009 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: create (cached) remote protocol -P00 DEBUG: Protocol::Remote::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = [BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote, strCommandSSH = ssh, strHost = backup, strUser = [USER-1] -P00 DEBUG: Protocol::Command::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = ssh -o LogLevel=error -o Compression=no -o PasswordAuthentication=no backrest@backup '[BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote', strId = 'backup remote', strName = remote -P00 DEBUG: Protocol::Storage::Remote->new(): oProtocol = [object] -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000090000000900000009, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol -P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = [undef], strArchiveId = 9.4-1 -P00 INFO: unable to find 000000090000000900000009 in the archive -P00 DEBUG: Archive::Get::Get->get=>: iResult = 1 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 1, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup -P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 1 diff --git a/test/expect/archive-get-008.log b/test/expect/archive-get-008.log deleted file mode 100644 index 2956cea1d..000000000 --- a/test/expect/archive-get-008.log +++ /dev/null @@ -1,181 +0,0 @@ -run 008 - rmt 1, cmp 1, exists 1, s3 0 -====================================== - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db -P00 INFO: get WAL segment 000000010000000100000001 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001, strSourceArchive = 000000010000000100000001 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: create (cached) remote protocol -P00 DEBUG: Protocol::Remote::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = [BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote, strCommandSSH = ssh, strHost = backup, strUser = [USER-1] -P00 DEBUG: Protocol::Command::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = ssh -o LogLevel=error -o Compression=no -o PasswordAuthentication=no backrest@backup '[BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote', strId = 'backup remote', strName = remote -P00 DEBUG: Protocol::Storage::Remote->new(): oProtocol = [object] -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000001, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol -P00 ERROR: [055]: raised on 'backup remote' host: archive.info does not exist but is required to push/get WAL segments - HINT: is archive_command configured in postgresql.conf? - HINT: has a stanza-create been performed? - HINT: use --no-archive-check to disable archive checks during backup if you have an alternate archiving scheme. -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup -P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: aborted with exception [055] -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 55 - -stanza-create db - create required data for stanza (backup host) -> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-create ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --db-user=[USER-2] --lock-path=[TEST_PATH]/backup/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/backup/log --no-online --protocol-timeout=60 --repo-path=[TEST_PATH]/backup/repo --stanza=db -P00 INFO: stanza-create command end: completed successfully - -+ supplemental file: [TEST_PATH]/backup/repo/backup/db/backup.info ------------------------------------------------------------------- -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-catalog-version=201409291 -db-control-version=942 -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-catalog-version":201409291,"db-control-version":942,"db-system-id":6353949018581704918,"db-version":"9.4"} - -+ supplemental file: [TEST_PATH]/backup/repo/archive/db/archive.info --------------------------------------------------------------------- -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-id":6353949018581704918,"db-version":"9.4"} - -+ supplemental file: [TEST_PATH]/backup/repo/archive/db/archive.info --------------------------------------------------------------------- -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-id":6353949018581704918,"db-version":"9.4"} - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get --cmd-ssh=/usr/bin/ssh 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --cmd-ssh=/usr/bin/ssh --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db -P00 INFO: get WAL segment 000000010000000100000001 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001, strSourceArchive = 000000010000000100000001 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: create (cached) remote protocol -P00 DEBUG: Protocol::Remote::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = [BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote, strCommandSSH = /usr/bin/ssh, strHost = backup, strUser = [USER-1] -P00 DEBUG: Protocol::Command::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = /usr/bin/ssh -o LogLevel=error -o Compression=no -o PasswordAuthentication=no backrest@backup '[BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote', strId = 'backup remote', strName = remote -P00 DEBUG: Protocol::Storage::Remote->new(): oProtocol = [object] -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000001, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol -P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = 000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz, strArchiveId = 9.4-1 -P00 DEBUG: Protocol::Storage::Remote->openRead(): rhParam = [hash], strFileExp = /9.4-1/000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [undef], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp -P00 DEBUG: Storage::Local->openWrite(): bAtomic = , bPathCreate = , lTimestamp = [undef], rhyFilter = ({rxyParam => ({strCompressType => decompress}), strClass => pgBackRest::Storage::Filter::Gzip}), strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 -P00 DEBUG: Storage::Base->copy(): xDestinationFile = [object], xSourceFile = [object] -P00 DEBUG: Archive::Get::Get->get=>: iResult = 0 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup -P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000002 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db -P00 INFO: get WAL segment 000000010000000100000002 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002, strSourceArchive = 000000010000000100000002 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: create (cached) remote protocol -P00 DEBUG: Protocol::Remote::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = [BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote, strCommandSSH = ssh, strHost = backup, strUser = [USER-1] -P00 DEBUG: Protocol::Command::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = ssh -o LogLevel=error -o Compression=no -o PasswordAuthentication=no backrest@backup '[BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote', strId = 'backup remote', strName = remote -P00 DEBUG: Protocol::Storage::Remote->new(): oProtocol = [object] -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000002, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol -P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = 000000010000000100000002-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz, strArchiveId = 9.4-1 -P00 DEBUG: Protocol::Storage::Remote->openRead(): rhParam = [hash], strFileExp = /9.4-1/000000010000000100000002-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [undef], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp -P00 DEBUG: Storage::Local->openWrite(): bAtomic = , bPathCreate = , lTimestamp = [undef], rhyFilter = ({rxyParam => ({strCompressType => decompress}), strClass => pgBackRest::Storage::Filter::Gzip}), strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002 -P00 DEBUG: Storage::Base->copy(): xDestinationFile = [object], xSourceFile = [object] -P00 DEBUG: Archive::Get::Get->get=>: iResult = 0 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup -P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000003 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000003 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db -P00 INFO: get WAL segment 000000010000000100000003 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000003, strSourceArchive = 000000010000000100000003 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: create (cached) remote protocol -P00 DEBUG: Protocol::Remote::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = [BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote, strCommandSSH = ssh, strHost = backup, strUser = [USER-1] -P00 DEBUG: Protocol::Command::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = ssh -o LogLevel=error -o Compression=no -o PasswordAuthentication=no backrest@backup '[BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote', strId = 'backup remote', strName = remote -P00 DEBUG: Protocol::Storage::Remote->new(): oProtocol = [object] -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000003, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol -P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = 000000010000000100000003-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz, strArchiveId = 9.4-1 -P00 DEBUG: Protocol::Storage::Remote->openRead(): rhParam = [hash], strFileExp = /9.4-1/000000010000000100000003-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [undef], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp -P00 DEBUG: Storage::Local->openWrite(): bAtomic = , bPathCreate = , lTimestamp = [undef], rhyFilter = ({rxyParam => ({strCompressType => decompress}), strClass => pgBackRest::Storage::Filter::Gzip}), strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000003 -P00 DEBUG: Storage::Base->copy(): xDestinationFile = [object], xSourceFile = [object] -P00 DEBUG: Archive::Get::Get->get=>: iResult = 0 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup -P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 diff --git a/test/expect/archive-get-009.log b/test/expect/archive-get-009.log deleted file mode 100644 index 7000637b2..000000000 --- a/test/expect/archive-get-009.log +++ /dev/null @@ -1,181 +0,0 @@ -run 009 - rmt 1, cmp 1, exists 1, s3 1 -====================================== - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db -P00 INFO: get WAL segment 000000010000000100000001 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001, strSourceArchive = 000000010000000100000001 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: create (cached) remote protocol -P00 DEBUG: Protocol::Remote::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = [BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote, strCommandSSH = ssh, strHost = backup, strUser = [USER-1] -P00 DEBUG: Protocol::Command::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = ssh -o LogLevel=error -o Compression=no -o PasswordAuthentication=no backrest@backup '[BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote', strId = 'backup remote', strName = remote -P00 DEBUG: Protocol::Storage::Remote->new(): oProtocol = [object] -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000001, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol -P00 ERROR: [055]: raised on 'backup remote' host: archive.info does not exist but is required to push/get WAL segments - HINT: is archive_command configured in postgresql.conf? - HINT: has a stanza-create been performed? - HINT: use --no-archive-check to disable archive checks during backup if you have an alternate archiving scheme. -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup -P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: aborted with exception [055] -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 55 - -stanza-create db - create required data for stanza (backup host) -> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-create ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --db-user=[USER-2] --lock-path=[TEST_PATH]/backup/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/backup/log --no-online --protocol-timeout=60 --repo-path=/ --repo-s3-bucket=pgbackrest-dev --repo-s3-endpoint=s3.amazonaws.com --repo-s3-region=us-east-1 --no-repo-s3-verify-ssl --repo-type=s3 --stanza=db -P00 INFO: stanza-create command end: completed successfully - -+ supplemental file: /backup/db/backup.info -------------------------------------------- -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-catalog-version=201409291 -db-control-version=942 -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-catalog-version":201409291,"db-control-version":942,"db-system-id":6353949018581704918,"db-version":"9.4"} - -+ supplemental file: /archive/db/archive.info ---------------------------------------------- -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-id":6353949018581704918,"db-version":"9.4"} - -+ supplemental file: /archive/db/archive.info ---------------------------------------------- -[backrest] -backrest-checksum="[CHECKSUM]" -backrest-format=5 -backrest-version="[VERSION-1]" - -[db] -db-id=1 -db-system-id=6353949018581704918 -db-version="9.4" - -[db:history] -1={"db-id":6353949018581704918,"db-version":"9.4"} - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get --cmd-ssh=/usr/bin/ssh 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --cmd-ssh=/usr/bin/ssh --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db -P00 INFO: get WAL segment 000000010000000100000001 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001, strSourceArchive = 000000010000000100000001 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: create (cached) remote protocol -P00 DEBUG: Protocol::Remote::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = [BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote, strCommandSSH = /usr/bin/ssh, strHost = backup, strUser = [USER-1] -P00 DEBUG: Protocol::Command::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = /usr/bin/ssh -o LogLevel=error -o Compression=no -o PasswordAuthentication=no backrest@backup '[BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote', strId = 'backup remote', strName = remote -P00 DEBUG: Protocol::Storage::Remote->new(): oProtocol = [object] -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000001, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol -P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = 000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz, strArchiveId = 9.4-1 -P00 DEBUG: Protocol::Storage::Remote->openRead(): rhParam = [hash], strFileExp = /9.4-1/000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [undef], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp -P00 DEBUG: Storage::Local->openWrite(): bAtomic = , bPathCreate = , lTimestamp = [undef], rhyFilter = ({rxyParam => ({strCompressType => decompress}), strClass => pgBackRest::Storage::Filter::Gzip}), strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 -P00 DEBUG: Storage::Base->copy(): xDestinationFile = [object], xSourceFile = [object] -P00 DEBUG: Archive::Get::Get->get=>: iResult = 0 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup -P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000002 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db -P00 INFO: get WAL segment 000000010000000100000002 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002, strSourceArchive = 000000010000000100000002 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: create (cached) remote protocol -P00 DEBUG: Protocol::Remote::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = [BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote, strCommandSSH = ssh, strHost = backup, strUser = [USER-1] -P00 DEBUG: Protocol::Command::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = ssh -o LogLevel=error -o Compression=no -o PasswordAuthentication=no backrest@backup '[BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote', strId = 'backup remote', strName = remote -P00 DEBUG: Protocol::Storage::Remote->new(): oProtocol = [object] -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000002, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol -P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = 000000010000000100000002-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz, strArchiveId = 9.4-1 -P00 DEBUG: Protocol::Storage::Remote->openRead(): rhParam = [hash], strFileExp = /9.4-1/000000010000000100000002-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [undef], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp -P00 DEBUG: Storage::Local->openWrite(): bAtomic = , bPathCreate = , lTimestamp = [undef], rhyFilter = ({rxyParam => ({strCompressType => decompress}), strClass => pgBackRest::Storage::Filter::Gzip}), strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002 -P00 DEBUG: Storage::Base->copy(): xDestinationFile = [object], xSourceFile = [object] -P00 DEBUG: Archive::Get::Get->get=>: iResult = 0 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup -P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 - -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000003 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000003 ------------------------------------------------------------------------------------------------------------------------------------- -P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db -P00 INFO: get WAL segment 000000010000000100000003 -P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000003, strSourceArchive = 000000010000000100000003 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: create (cached) remote protocol -P00 DEBUG: Protocol::Remote::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = [BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote, strCommandSSH = ssh, strHost = backup, strUser = [USER-1] -P00 DEBUG: Protocol::Command::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = ssh -o LogLevel=error -o Compression=no -o PasswordAuthentication=no backrest@backup '[BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote', strId = 'backup remote', strName = remote -P00 DEBUG: Protocol::Storage::Remote->new(): oProtocol = [object] -P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000003, ullDbSysId = [undef] -P00 DEBUG: Db->new(): iRemoteIdx = 1 -P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] -P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> -P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 -P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup -P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol -P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = 000000010000000100000003-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz, strArchiveId = 9.4-1 -P00 DEBUG: Protocol::Storage::Remote->openRead(): rhParam = [hash], strFileExp = /9.4-1/000000010000000100000003-72b9da071c13957fb4ca31f05dbd5c644297c2f7.gz -P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [undef], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp -P00 DEBUG: Storage::Local->openWrite(): bAtomic = , bPathCreate = , lTimestamp = [undef], rhyFilter = ({rxyParam => ({strCompressType => decompress}), strClass => pgBackRest::Storage::Filter::Gzip}), strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000003 -P00 DEBUG: Storage::Base->copy(): xDestinationFile = [object], xSourceFile = [object] -P00 DEBUG: Archive::Get::Get->get=>: iResult = 0 -P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] -P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup -P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 -P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false -P00 INFO: archive-get command end: completed successfully -P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 diff --git a/test/expect/mock-archive-001.log b/test/expect/mock-archive-001.log index 043e3523e..c6f113a23 100644 --- a/test/expect/mock-archive-001.log +++ b/test/expect/mock-archive-001.log @@ -1,10 +1,9 @@ run 001 - rmt 0, s3 0 ===================== -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 --archive-max-mb=24 +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 ------------------------------------------------------------------------------------------------------------------------------------ -P00 INFO: archive-push command begin [BACKREST-VERSION]: --archive-max-mb=24 --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db -P00 WARN: 'archive-max-mb' is no longer not longer valid, use 'archive-queue-max' instead +P00 INFO: archive-push command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db P00 ERROR: [055]: unable to open [TEST_PATH]/db-master/repo/archive/db/archive.info or [TEST_PATH]/db-master/repo/archive/db/archive.info.copy P00 ERROR: [055]: archive.info does not exist but is required to push/get WAL segments HINT: is archive_command configured in postgresql.conf? @@ -12,6 +11,17 @@ P00 ERROR: [055]: archive.info does not exist but is required to push/get WAL s HINT: use --no-archive-check to disable archive checks during backup if you have an alternate archiving scheme. P00 INFO: archive-push command end: aborted with exception [055] +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG +------------------------------------------------------------------------------------------------------------------------------------ +P00 INFO: archive-get command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db +P00 INFO: get WAL segment 000000010000000100000001 +P00 ERROR: [055]: unable to open [TEST_PATH]/db-master/repo/archive/db/archive.info or [TEST_PATH]/db-master/repo/archive/db/archive.info.copy +P00 ERROR: [055]: archive.info does not exist but is required to push/get WAL segments + HINT: is archive_command configured in postgresql.conf? + HINT: has a stanza-create been performed? + HINT: use --no-archive-check to disable archive checks during backup if you have an alternate archiving scheme. +P00 INFO: archive-get command end: aborted with exception [055] + stanza-create db - stanza create (db-master host) > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --no-online --force stanza-create ------------------------------------------------------------------------------------------------------------------------------------ @@ -50,11 +60,75 @@ db-version="9.4" [db:history] 1={"db-id":6353949018581704918,"db-version":"9.4"} -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push --log-level-console=debug [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 ------------------------------------------------------------------------------------------------------------------------------------ -P00 INFO: archive-push command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db +P00 INFO: archive-push command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db +P00 DEBUG: Archive::Push::Push->process(): strWalPathFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 +P00 DEBUG: Archive::Push::File::archivePushFile(): bCompress = false, strWalFile = 000000010000000100000001, strWalPath = [TEST_PATH]/db-master/db/base/pg_xlog +P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [hash], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/repo, strTempExtension = pgbackrest.tmp +P00 DEBUG: Archive::Common::walInfo(): strWalFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 +P00 DEBUG: Archive::Common::walInfo=>: strDbVersion = 9.4, ullDbSysId = 6353949018581704918 +P00 DEBUG: Archive::Push::File::archivePushCheck(): strArchiveFile = 000000010000000100000001, strDbVersion = 9.4, strWalFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001, ullDbSysId = 6353949018581704918 +P00 DEBUG: Archive::Info->new(): bIgnoreMissing = , bLoad = , bRequired = , strArchiveClusterPath = [TEST_PATH]/db-master/repo/archive/db +P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/repo/archive/db/archive.info +P00 DEBUG: Archive::Info->check(): bRequired = , strDbVersion = 9.4, ullDbSysId = 6353949018581704918 +P00 DEBUG: Archive::Info->archiveId(): strDbVersion = [undef], ullDbSysId = [undef] +P00 DEBUG: Archive::Info->archiveId=>: strArchiveId = 9.4-1 +P00 DEBUG: Archive::Info->check=>: strArchiveId = 9.4-1 +P00 DEBUG: Archive::Common::walSegmentFind(): iWaitSeconds = [undef], oStorageRepo = [object], strArchiveId = 9.4-1, strWalSegment = 000000010000000100000001 +P00 DEBUG: Storage::Local->list(): bIgnoreMissing = true, strExpression = ^000000010000000100000001-[0-f]{40}(\.gz){0,1}$, strPathExp = /9.4-1/0000000100000001, strSortOrder = +P00 DEBUG: Storage::Local->list=>: stryFileList = () +P00 DEBUG: Archive::Common::walSegmentFind=>: strWalFileName = [undef] +P00 DEBUG: Archive::Push::File::archivePushCheck=>: strArchiveId = 9.4-1, strChecksum = [undef], strWarning = [undef] +P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [undef], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp +P00 DEBUG: Storage::Local->hashSize(): xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 +P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = , rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 +P00 DEBUG: Storage::Local->hashSize=>: lSize = 16777216, strHash = 72b9da071c13957fb4ca31f05dbd5c644297c2f7 +P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = , rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 +P00 DEBUG: Storage::Local->openWrite(): bAtomic = true, bPathCreate = true, lTimestamp = [undef], rhyFilter = [undef], strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = /9.4-1/000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7 +P00 DEBUG: Storage::Base->copy(): xDestinationFile = [object], xSourceFile = [object] +P00 DEBUG: Archive::Push::File::archivePushFile=>: strWarning = [undef] P00 INFO: pushed WAL segment 000000010000000100000001 +P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] +P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] +P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: archive-push command end: completed successfully +P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 + +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get --log-level-console=debug 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG +------------------------------------------------------------------------------------------------------------------------------------ +P00 INFO: archive-get command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db +P00 INFO: get WAL segment 000000010000000100000001 +P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG, strSourceArchive = 000000010000000100000001 +P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [hash], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/repo, strTempExtension = pgbackrest.tmp +P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000001, ullDbSysId = [undef] +P00 DEBUG: Db->new(): iRemoteIdx = 1 +P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] +P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> +P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 +P00 DEBUG: Archive::Info->new(): bIgnoreMissing = , bLoad = , bRequired = true, strArchiveClusterPath = [TEST_PATH]/db-master/repo/archive/db +P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = true, rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/repo/archive/db/archive.info +P00 DEBUG: Archive::Info->check(): bRequired = , strDbVersion = 9.4, ullDbSysId = 6353949018581704918 +P00 DEBUG: Archive::Info->archiveId(): strDbVersion = [undef], ullDbSysId = [undef] +P00 DEBUG: Archive::Info->archiveId=>: strArchiveId = 9.4-1 +P00 DEBUG: Archive::Info->check=>: strArchiveId = 9.4-1 +P00 DEBUG: Archive::Common::walSegmentFind(): iWaitSeconds = [undef], oStorageRepo = [object], strArchiveId = 9.4-1, strWalSegment = 000000010000000100000001 +P00 DEBUG: Storage::Local->list(): bIgnoreMissing = true, strExpression = ^000000010000000100000001-[0-f]{40}(\.gz){0,1}$, strPathExp = /9.4-1/0000000100000001, strSortOrder = +P00 DEBUG: Storage::Local->list=>: stryFileList = (000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7) +P00 DEBUG: Archive::Common::walSegmentFind=>: strWalFileName = 000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7 +P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = 000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7, strArchiveId = 9.4-1 +P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = , rhyFilter = [undef], xFileExp = /9.4-1/000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7 +P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [undef], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp +P00 DEBUG: Storage::Local->openWrite(): bAtomic = , bPathCreate = , lTimestamp = [undef], rhyFilter = [undef], strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG +P00 DEBUG: Storage::Base->copy(): xDestinationFile = [object], xSourceFile = [object] +P00 DEBUG: Archive::Get::Get->get=>: iResult = 0 +P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] +P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] +P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false +P00 INFO: archive-get command end: completed successfully +P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push --compress --archive-async --process-max=2 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002 ------------------------------------------------------------------------------------------------------------------------------------ @@ -69,6 +143,14 @@ P00 ERROR: [044]: WAL segment version 9.4 does not match archive version 8.0 HINT: are you archiving to the correct stanza? P00 INFO: archive-push command end: aborted with exception [044] +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG +------------------------------------------------------------------------------------------------------------------------------------ +P00 INFO: archive-get command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db +P00 INFO: get WAL segment 000000010000000100000001 +P00 ERROR: [044]: WAL segment version 9.4 does not match archive version 8.0 + HINT: are you archiving to the correct stanza? +P00 INFO: archive-get command end: aborted with exception [044] + > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002 ------------------------------------------------------------------------------------------------------------------------------------ P00 INFO: archive-push command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db @@ -76,6 +158,14 @@ P00 ERROR: [044]: WAL segment system-id 6353949018581704918 does not match arch HINT: are you archiving to the correct stanza? P00 INFO: archive-push command end: aborted with exception [044] +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG +------------------------------------------------------------------------------------------------------------------------------------ +P00 INFO: archive-get command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db +P00 INFO: get WAL segment 000000010000000100000001 +P00 ERROR: [044]: WAL segment system-id 6353949018581704918 does not match archive system-id 5000900090001855000 + HINT: are you archiving to the correct stanza? +P00 INFO: archive-get command end: aborted with exception [044] + stop db stanza (db-master host) > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db stop ------------------------------------------------------------------------------------------------------------------------------------ @@ -88,6 +178,13 @@ P00 INFO: archive-push command begin [BACKREST-VERSION]: --no-compress --confi P00 ERROR: [062]: stop file exists for stanza db P00 INFO: archive-push command end: aborted with exception [062] +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG +------------------------------------------------------------------------------------------------------------------------------------ +P00 INFO: archive-get command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db +P00 INFO: get WAL segment 000000010000000100000001 +P00 ERROR: [062]: stop file exists for stanza db +P00 INFO: archive-get command end: aborted with exception [062] + start db stanza (db-master host) > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db start ------------------------------------------------------------------------------------------------------------------------------------ @@ -108,6 +205,12 @@ P00 INFO: archive-push command begin [BACKREST-VERSION]: --no-compress --confi P00 ERROR: [045]: WAL segment 000000010000000100000002 already exists in the archive P00 INFO: archive-push command end: aborted with exception [045] +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000002 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG +------------------------------------------------------------------------------------------------------------------------------------ +P00 INFO: archive-get command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db +P00 INFO: get WAL segment 000000010000000100000002 +P00 INFO: archive-get command end: completed successfully + > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002.partial ------------------------------------------------------------------------------------------------------------------------------------ P00 INFO: archive-push command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --repo-path=[TEST_PATH]/db-master/repo --stanza=db diff --git a/test/expect/mock-archive-002.log b/test/expect/mock-archive-002.log index c2383dc57..f792bb651 100644 --- a/test/expect/mock-archive-002.log +++ b/test/expect/mock-archive-002.log @@ -1,16 +1,25 @@ run 002 - rmt 1, s3 0 ===================== -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 --archive-max-mb=24 +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 ------------------------------------------------------------------------------------------------------------------------------------ -P00 INFO: archive-push command begin [BACKREST-VERSION]: --archive-max-mb=24 --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db -P00 WARN: 'archive-max-mb' is no longer not longer valid, use 'archive-queue-max' instead +P00 INFO: archive-push command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db P00 ERROR: [055]: raised on 'backup remote' host: archive.info does not exist but is required to push/get WAL segments HINT: is archive_command configured in postgresql.conf? HINT: has a stanza-create been performed? HINT: use --no-archive-check to disable archive checks during backup if you have an alternate archiving scheme. P00 INFO: archive-push command end: aborted with exception [055] +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG +------------------------------------------------------------------------------------------------------------------------------------ +P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db +P00 INFO: get WAL segment 000000010000000100000001 +P00 ERROR: [055]: raised on 'backup remote' host: archive.info does not exist but is required to push/get WAL segments + HINT: is archive_command configured in postgresql.conf? + HINT: has a stanza-create been performed? + HINT: use --no-archive-check to disable archive checks during backup if you have an alternate archiving scheme. +P00 INFO: archive-get command end: aborted with exception [055] + stanza-create db - stanza create (backup host) > [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --no-online --force stanza-create ------------------------------------------------------------------------------------------------------------------------------------ @@ -49,11 +58,71 @@ db-version="9.4" [db:history] 1={"db-id":6353949018581704918,"db-version":"9.4"} -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push --cmd-ssh=/usr/bin/ssh [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push --cmd-ssh=/usr/bin/ssh --log-level-console=debug [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 ------------------------------------------------------------------------------------------------------------------------------------ -P00 INFO: archive-push command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --cmd-ssh=/usr/bin/ssh --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db +P00 INFO: archive-push command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --cmd-ssh=/usr/bin/ssh --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db +P00 DEBUG: Archive::Push::Push->process(): strWalPathFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 +P00 DEBUG: Archive::Push::File::archivePushFile(): bCompress = false, strWalFile = 000000010000000100000001, strWalPath = [TEST_PATH]/db-master/db/base/pg_xlog +P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup +P00 DEBUG: Protocol::Helper::protocolGet: create (cached) remote protocol +P00 DEBUG: Protocol::Remote::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = [BACKREST-BIN] --buffer-size=4194304 --command=archive-push --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote, strCommandSSH = /usr/bin/ssh, strHost = backup, strUser = [USER-1] +P00 DEBUG: Protocol::Command::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = /usr/bin/ssh -o LogLevel=error -o Compression=no -o PasswordAuthentication=no backrest@backup '[BACKREST-BIN] --buffer-size=4194304 --command=archive-push --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote', strId = 'backup remote', strName = remote +P00 DEBUG: Protocol::Storage::Remote->new(): oProtocol = [object] +P00 DEBUG: Archive::Common::walInfo(): strWalFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 +P00 DEBUG: Archive::Common::walInfo=>: strDbVersion = 9.4, ullDbSysId = 6353949018581704918 +P00 DEBUG: Archive::Push::File::archivePushCheck(): strArchiveFile = 000000010000000100000001, strDbVersion = 9.4, strWalFile = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001, ullDbSysId = 6353949018581704918 +P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup +P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol +P00 DEBUG: Archive::Push::File::archivePushCheck=>: strArchiveId = 9.4-1, strChecksum = [undef], strWarning = [undef] +P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [undef], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp +P00 DEBUG: Storage::Local->hashSize(): xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 +P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = , rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 +P00 DEBUG: Storage::Local->hashSize=>: lSize = 16777216, strHash = 72b9da071c13957fb4ca31f05dbd5c644297c2f7 +P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = , rhyFilter = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 +P00 DEBUG: Protocol::Storage::Remote->openWrite(): rhParam = [hash], strFileExp = /9.4-1/000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7 +P00 DEBUG: Storage::Base->copy(): xDestinationFile = [object], xSourceFile = [object] +P00 DEBUG: Archive::Push::File::archivePushFile=>: strWarning = [undef] P00 INFO: pushed WAL segment 000000010000000100000001 +P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] +P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] +P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup +P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 +P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: archive-push command end: completed successfully +P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 + +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get --log-level-console=debug 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG +------------------------------------------------------------------------------------------------------------------------------------ +P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db +P00 INFO: get WAL segment 000000010000000100000001 +P00 DEBUG: Archive::Get::Get->get(): strDestinationFile = [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG, strSourceArchive = 000000010000000100000001 +P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup +P00 DEBUG: Protocol::Helper::protocolGet: create (cached) remote protocol +P00 DEBUG: Protocol::Remote::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = [BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote, strCommandSSH = ssh, strHost = backup, strUser = [USER-1] +P00 DEBUG: Protocol::Command::Master->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 60, strCommand = ssh -o LogLevel=error -o Compression=no -o PasswordAuthentication=no backrest@backup '[BACKREST-BIN] --buffer-size=4194304 --command=archive-get --compress-level=6 --compress-level-network=3 --config=[TEST_PATH]/backup/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --db-timeout=45 --protocol-timeout=60 --stanza=db --type=backup remote', strId = 'backup remote', strName = remote +P00 DEBUG: Protocol::Storage::Remote->new(): oProtocol = [object] +P00 DEBUG: Archive::Base->getCheck(): strDbVersion = [undef], strWalFile = 000000010000000100000001, ullDbSysId = [undef] +P00 DEBUG: Db->new(): iRemoteIdx = 1 +P00 DEBUG: Db::dbObjectGet=>: iDbMasterIdx = 1, iDbStandbyIdx = [undef], oDbMaster = [object], oDbStandby = [undef] +P00 DEBUG: Db->info(): strDbPath = <[TEST_PATH]/db-master/db/base> +P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918 +P00 DEBUG: Protocol::Helper::protocolGet(): bCache = , iProcessIdx = [undef], iRemoteIdx = <1>, strBackRestBin = [undef], strCommand = , strRemoteType = backup +P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol +P00 DEBUG: Archive::Base->getCheck=>: strArchiveFile = 000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7, strArchiveId = 9.4-1 +P00 DEBUG: Protocol::Storage::Remote->openRead(): rhParam = [hash], strFileExp = /9.4-1/000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7 +P00 DEBUG: Storage::Local->new(): bAllowTemp = , hRule = [undef], lBufferMax = 4194304, oDriver = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp +P00 DEBUG: Storage::Local->openWrite(): bAtomic = , bPathCreate = , lTimestamp = [undef], rhyFilter = [undef], strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG +P00 DEBUG: Storage::Base->copy(): xDestinationFile = [object], xSourceFile = [object] +P00 DEBUG: Archive::Get::Get->get=>: iResult = 0 +P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] +P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] +P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup +P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 +P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false +P00 INFO: archive-get command end: completed successfully +P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push --compress --archive-async --process-max=2 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002 ------------------------------------------------------------------------------------------------------------------------------------ @@ -68,6 +137,14 @@ P00 ERROR: [044]: raised on 'backup remote' host: WAL segment version 9.4 does HINT: are you archiving to the correct stanza? P00 INFO: archive-push command end: aborted with exception [044] +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG +------------------------------------------------------------------------------------------------------------------------------------ +P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db +P00 INFO: get WAL segment 000000010000000100000001 +P00 ERROR: [044]: raised on 'backup remote' host: WAL segment version 9.4 does not match archive version 8.0 + HINT: are you archiving to the correct stanza? +P00 INFO: archive-get command end: aborted with exception [044] + > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002 ------------------------------------------------------------------------------------------------------------------------------------ P00 INFO: archive-push command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db @@ -75,6 +152,14 @@ P00 ERROR: [044]: raised on 'backup remote' host: WAL segment system-id 6353949 HINT: are you archiving to the correct stanza? P00 INFO: archive-push command end: aborted with exception [044] +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG +------------------------------------------------------------------------------------------------------------------------------------ +P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db +P00 INFO: get WAL segment 000000010000000100000001 +P00 ERROR: [044]: raised on 'backup remote' host: WAL segment system-id 6353949018581704918 does not match archive system-id 5000900090001855000 + HINT: are you archiving to the correct stanza? +P00 INFO: archive-get command end: aborted with exception [044] + stop db stanza (db-master host) > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db stop ------------------------------------------------------------------------------------------------------------------------------------ @@ -87,6 +172,13 @@ P00 INFO: archive-push command begin [BACKREST-VERSION]: --backup-cmd=[BACKRES P00 ERROR: [062]: stop file exists for stanza db P00 INFO: archive-push command end: aborted with exception [062] +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG +------------------------------------------------------------------------------------------------------------------------------------ +P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db +P00 INFO: get WAL segment 000000010000000100000001 +P00 ERROR: [062]: stop file exists for stanza db +P00 INFO: archive-get command end: aborted with exception [062] + start db stanza (db-master host) > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db start ------------------------------------------------------------------------------------------------------------------------------------ @@ -107,6 +199,12 @@ P00 INFO: archive-push command begin [BACKREST-VERSION]: --backup-cmd=[BACKRES P00 ERROR: [045]: WAL segment 000000010000000100000002 already exists in the archive P00 INFO: archive-push command end: aborted with exception [045] +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get --cmd-ssh=/usr/bin/ssh 000000010000000100000002 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG +------------------------------------------------------------------------------------------------------------------------------------ +P00 INFO: archive-get command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --cmd-ssh=/usr/bin/ssh --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db +P00 INFO: get WAL segment 000000010000000100000002 +P00 INFO: archive-get command end: completed successfully + > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002.partial ------------------------------------------------------------------------------------------------------------------------------------ P00 INFO: archive-push command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] --backup-config=[TEST_PATH]/backup/pgbackrest.conf --backup-host=backup --backup-user=[USER-1] --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --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 --protocol-timeout=60 --stanza=db diff --git a/test/expect/mock-archive-003.log b/test/expect/mock-archive-003.log index 34b3d1aa3..771aab887 100644 --- a/test/expect/mock-archive-003.log +++ b/test/expect/mock-archive-003.log @@ -1,9 +1,15 @@ run 003 - rmt 1, s3 1 ===================== -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 --archive-max-mb=24 +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 +------------------------------------------------------------------------------------------------------------------------------------ +P00 ERROR: [055]: raised on 'backup remote' host: archive.info does not exist but is required to push/get WAL segments + HINT: is archive_command configured in postgresql.conf? + HINT: has a stanza-create been performed? + HINT: use --no-archive-check to disable archive checks during backup if you have an alternate archiving scheme. + +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG ------------------------------------------------------------------------------------------------------------------------------------ -P00 WARN: 'archive-max-mb' is no longer not longer valid, use 'archive-queue-max' instead P00 ERROR: [055]: raised on 'backup remote' host: archive.info does not exist but is required to push/get WAL segments HINT: is archive_command configured in postgresql.conf? HINT: has a stanza-create been performed? @@ -47,7 +53,10 @@ db-version="9.4" [db:history] 1={"db-id":6353949018581704918,"db-version":"9.4"} -> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push --cmd-ssh=/usr/bin/ssh [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push --cmd-ssh=/usr/bin/ssh --log-level-console=warn [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 +------------------------------------------------------------------------------------------------------------------------------------ + +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get --log-level-console=warn 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG ------------------------------------------------------------------------------------------------------------------------------------ > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push --compress --archive-async --process-max=2 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002 @@ -58,11 +67,21 @@ db-version="9.4" P00 ERROR: [044]: raised on 'backup remote' host: WAL segment version 9.4 does not match archive version 8.0 HINT: are you archiving to the correct stanza? +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG +------------------------------------------------------------------------------------------------------------------------------------ +P00 ERROR: [044]: raised on 'backup remote' host: WAL segment version 9.4 does not match archive version 8.0 + HINT: are you archiving to the correct stanza? + > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002 ------------------------------------------------------------------------------------------------------------------------------------ P00 ERROR: [044]: raised on 'backup remote' host: WAL segment system-id 6353949018581704918 does not match archive system-id 5000900090001855000 HINT: are you archiving to the correct stanza? +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG +------------------------------------------------------------------------------------------------------------------------------------ +P00 ERROR: [044]: raised on 'backup remote' host: WAL segment system-id 6353949018581704918 does not match archive system-id 5000900090001855000 + HINT: are you archiving to the correct stanza? + stop db stanza (db-master host) > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db stop ------------------------------------------------------------------------------------------------------------------------------------ @@ -71,6 +90,10 @@ stop db stanza (db-master host) ------------------------------------------------------------------------------------------------------------------------------------ P00 ERROR: [062]: stop file exists for stanza db +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG +------------------------------------------------------------------------------------------------------------------------------------ +P00 ERROR: [062]: stop file exists for stanza db + start db stanza (db-master host) > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db start ------------------------------------------------------------------------------------------------------------------------------------ @@ -84,6 +107,9 @@ P00 WARN: WAL segment 000000010000000100000002 already exists in the archive w ------------------------------------------------------------------------------------------------------------------------------------ P00 ERROR: [045]: WAL segment 000000010000000100000002 already exists in the archive +> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get --cmd-ssh=/usr/bin/ssh 000000010000000100000002 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG +------------------------------------------------------------------------------------------------------------------------------------ + > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002.partial ------------------------------------------------------------------------------------------------------------------------------------ diff --git a/test/lib/pgBackRestTest/Common/DefineTest.pm b/test/lib/pgBackRestTest/Common/DefineTest.pm index 79f2a3e2b..755a2cf9f 100644 --- a/test/lib/pgBackRestTest/Common/DefineTest.pm +++ b/test/lib/pgBackRestTest/Common/DefineTest.pm @@ -312,12 +312,6 @@ my $oTestDef = &TESTDEF_INDIVIDUAL => true, &TESTDEF_EXPECT => true, }, - { - &TESTDEF_NAME => 'get', - &TESTDEF_TOTAL => 9, - &TESTDEF_INDIVIDUAL => true, - &TESTDEF_EXPECT => true, - }, ] }, # Backup tests diff --git a/test/lib/pgBackRestTest/Module/Archive/ArchiveGetTest.pm b/test/lib/pgBackRestTest/Module/Archive/ArchiveGetTest.pm deleted file mode 100644 index ff8c1f797..000000000 --- a/test/lib/pgBackRestTest/Module/Archive/ArchiveGetTest.pm +++ /dev/null @@ -1,183 +0,0 @@ -#################################################################################################################################### -# ArchiveGetTest.pm - Tests for archive-get command -#################################################################################################################################### -package pgBackRestTest::Module::Archive::ArchiveGetTest; -use parent 'pgBackRestTest::Env::HostEnvTest'; - -#################################################################################################################################### -# Perl includes -#################################################################################################################################### -use strict; -use warnings FATAL => qw(all); -use Carp qw(confess); - -use File::Basename qw(dirname); - -use pgBackRest::Archive::Info; -use pgBackRest::Backup::Info; -use pgBackRest::DbVersion; -use pgBackRest::Common::Exception; -use pgBackRest::Common::Ini; -use pgBackRest::Common::Log; -use pgBackRest::Common::Wait; -use pgBackRest::Config::Config; -use pgBackRest::Manifest; -use pgBackRest::Protocol::Storage::Helper; -use pgBackRest::Storage::Base; -use pgBackRest::Storage::Filter::Gzip; - -use pgBackRestTest::Env::HostEnvTest; -use pgBackRestTest::Common::ExecuteTest; -use pgBackRestTest::Common::FileTest; -use pgBackRestTest::Common::RunTest; - -#################################################################################################################################### -# run -#################################################################################################################################### -sub run -{ - my $self = shift; - - my $strArchiveChecksum = '72b9da071c13957fb4ca31f05dbd5c644297c2f7'; - my $iArchiveMax = 3; - my $strArchiveTestFile = $self->dataPath() . '/backup.wal2_' . WAL_VERSION_94 . '.bin'; - - foreach my $bS3 (false, true) - { - foreach my $bRemote ($bS3 ? (true) : (false, true)) - { - foreach my $bCompress ($bS3 ? (true) : (false, true)) - { - foreach my $bExists ($bS3 ? (true) : (false, true)) - { - # Increment the run, log, and decide whether this unit test should be run - if (!$self->begin("rmt ${bRemote}, cmp ${bCompress}, exists ${bExists}, s3 ${bS3}")) {next} - - # Create hosts and config - my ($oHostDbMaster, $oHostDbStandby, $oHostBackup, $oHostS3) = $self->setup( - true, $self->expect(), {bHostBackup => $bRemote, bCompress => $bCompress, bS3 => $bS3}); - - # Create the xlog path - my $strXlogPath = $oHostDbMaster->dbBasePath() . '/pg_xlog'; - storageDb()->pathCreate($strXlogPath, {bCreateParent => true}); - - # Create the test path for pg_control and copy pg_control for stanza-create - storageDb()->pathCreate($oHostDbMaster->dbBasePath() . '/' . DB_PATH_GLOBAL, {bCreateParent => true}); - executeTest( - 'cp ' . $self->dataPath() . '/backup.pg_control_' . WAL_VERSION_94 . '.bin ' . $oHostDbMaster->dbBasePath() . '/' . - DB_FILE_PGCONTROL); - - my $strCommand = - $oHostDbMaster->backrestExe() . - ' --config=' . $oHostDbMaster->backrestConfig() . - ' --stanza=' . $self->stanza() . ' archive-get'; - - # Fail on missing archive info file - $oHostDbMaster->executeSimple( - $strCommand . " 000000010000000100000001 ${strXlogPath}/000000010000000100000001", - {iExpectedExitStatus => ERROR_FILE_MISSING, oLogTest => $self->expect()}); - - # Create the archive info file - $oHostBackup->stanzaCreate('create required data for stanza', {strOptionalParam => '--no-' . OPTION_ONLINE}); - - if (defined($self->expect())) - { - $self->expect()->supplementalAdd( - storageRepo()->pathGet(STORAGE_REPO_ARCHIVE . qw{/} . ARCHIVE_INFO_FILE), undef, - ${storageRepo()->get(STORAGE_REPO_ARCHIVE . qw{/} . ARCHIVE_INFO_FILE)}); - } - - if ($bExists) - { - # Loop through archive files - my $strArchiveFile; - - for (my $iArchiveNo = 1; $iArchiveNo <= $iArchiveMax; $iArchiveNo++) - { - # Construct the archive filename - if ($iArchiveNo > 255) - { - confess 'backup total * archive total cannot be greater than 255'; - } - - $strArchiveFile = uc(sprintf('0000000100000001%08x', $iArchiveNo)); - - &log(INFO, ' archive ' .sprintf('%02x', $iArchiveNo) . - " - ${strArchiveFile}"); - - my $strSourceFile = "${strArchiveFile}-${strArchiveChecksum}"; - - if ($bCompress) - { - $strSourceFile .= '.gz'; - } - - # Change the directory permissions to enable file creation - forceStorageMode(storageRepo(), STORAGE_REPO_ARCHIVE, '770'); - - storageRepo()->pathCreate( - STORAGE_REPO_ARCHIVE . qw{/} . PG_VERSION_94 . '-1/' . substr($strArchiveFile, 0, 16), - {strMode => '0770', bIgnoreExists => true, bCreateParent => true}); - - storageTest()->copy( - $strArchiveTestFile, - storageRepo()->openWrite( - STORAGE_REPO_ARCHIVE . qw{/} . PG_VERSION_94 . "-1/${strSourceFile}", - {rhyFilter => $bCompress ? [{strClass => STORAGE_FILTER_GZIP}] : undef, - strMode => '0660', bCreateParent => true})); - - my ($strActualChecksum) = storageRepo()->hashSize( - storageRepo()->openRead( - STORAGE_REPO_ARCHIVE . qw{/} . PG_VERSION_94 . "-1/${strSourceFile}", - {rhyFilter => $bCompress ? - [{strClass => STORAGE_FILTER_GZIP, rxyParam => [{strCompressType => STORAGE_DECOMPRESS}]}] : undef})); - - if ($strActualChecksum ne $strArchiveChecksum) - { - confess "archive file hash '${strActualChecksum}' does not match expected '${strArchiveChecksum}'"; - } - - my $strDestinationFile = "${strXlogPath}/${strArchiveFile}"; - - $oHostDbMaster->executeSimple( - $strCommand . ($bRemote && $iArchiveNo == 1 ? ' --cmd-ssh=/usr/bin/ssh' : '') . - " ${strArchiveFile} ${strDestinationFile}", - {oLogTest => $self->expect()}); - - # Check that the destination file exists - if (storageDb()->exists($strDestinationFile)) - { - my ($strActualChecksum) = storageDb()->hashSize($strDestinationFile); - - if ($strActualChecksum ne $strArchiveChecksum) - { - confess "recovered file hash '${strActualChecksum}' does not match expected '${strArchiveChecksum}'"; - } - } - else - { - confess "archive file '${strDestinationFile}' is not in destination"; - } - } - } - else - { - $oHostDbMaster->stop(); - - $oHostDbMaster->executeSimple( - $strCommand . " 000000090000000900000009 ${strXlogPath}/RECOVERYXLOG", - {iExpectedExitStatus => ERROR_STOP, oLogTest => $self->expect()}); - - $oHostDbMaster->start(); - - $oHostDbMaster->executeSimple( - $strCommand . " 000000090000000900000009 ${strXlogPath}/RECOVERYXLOG", - {iExpectedExitStatus => 1, oLogTest => $self->expect()}); - } - } - } - } - } -} - -1; diff --git a/test/lib/pgBackRestTest/Module/Mock/MockArchiveTest.pm b/test/lib/pgBackRestTest/Module/Mock/MockArchiveTest.pm index 315364e57..8dbacbb36 100644 --- a/test/lib/pgBackRestTest/Module/Mock/MockArchiveTest.pm +++ b/test/lib/pgBackRestTest/Module/Mock/MockArchiveTest.pm @@ -92,6 +92,7 @@ sub run # Reduce console logging to detail $oHostDbMaster->configUpdate({&CONFIG_SECTION_GLOBAL => {&OPTION_LOG_LEVEL_CONSOLE => lc(DETAIL)}}); + my $strLogDebug = '--' . OPTION_LOG_LEVEL_CONSOLE . qw{=} . lc(DEBUG); # If S3 set process max to 2. This seems like the best place for parallel testing since it will help speed S3 processing # without slowing down the other tests too much. @@ -100,8 +101,9 @@ sub run $oHostBackup->configUpdate({&CONFIG_SECTION_GLOBAL => {&OPTION_PROCESS_MAX => 2}}); $oHostDbMaster->configUpdate({&CONFIG_SECTION_GLOBAL => {&OPTION_PROCESS_MAX => 2}}); - # Reduce console logging to warn + # Reduce console logging to warn (even for debug exceptions) $oHostDbMaster->configUpdate({&CONFIG_SECTION_GLOBAL => {&OPTION_LOG_LEVEL_CONSOLE => lc(WARN)}}); + $strLogDebug = '--' . OPTION_LOG_LEVEL_CONSOLE . qw{=} . lc(WARN); } # Create the xlog path @@ -117,8 +119,13 @@ sub run $oHostDbMaster->dbBasePath() . qw{/} . DB_FILE_PGCONTROL); # Create archive-push command - my $strCommand = - $oHostDbMaster->backrestExe() . ' --config=' . $oHostDbMaster->backrestConfig() . ' --stanza=db archive-push'; + my $strCommandPush = + $oHostDbMaster->backrestExe() . ' --config=' . $oHostDbMaster->backrestConfig() . ' --stanza=' . $self->stanza() . + ' ' . CMD_ARCHIVE_PUSH; + + my $strCommandGet = + $oHostDbMaster->backrestExe() . ' --config=' . $oHostDbMaster->backrestConfig() . ' --stanza=' . $self->stanza() . + ' ' . CMD_ARCHIVE_GET; #--------------------------------------------------------------------------------------------------------------------------- &log(INFO, ' archive.info missing'); @@ -126,7 +133,12 @@ sub run storageTest()->pathCreate("${strXlogPath}/archive_status"); my $strArchiveFile1 = $self->walGenerate($strXlogPath, WAL_VERSION_94, 1, $strSourceFile1); - $oHostDbMaster->executeSimple($strCommand . " ${strXlogPath}/${strSourceFile1} --archive-max-mb=24", + $oHostDbMaster->executeSimple( + $strCommandPush . " ${strXlogPath}/${strSourceFile1}", + {iExpectedExitStatus => ERROR_FILE_MISSING, oLogTest => $self->expect()}); + + $oHostDbMaster->executeSimple( + $strCommandGet . " ${strSourceFile1} ${strXlogPath}/RECOVERYXLOG", {iExpectedExitStatus => ERROR_FILE_MISSING, oLogTest => $self->expect()}); #--------------------------------------------------------------------------------------------------------------------------- @@ -140,13 +152,38 @@ sub run my $strArchiveFile = $self->walGenerate($strXlogPath, WAL_VERSION_94, 2, $strSourceFile); $oHostDbMaster->executeSimple( - $strCommand . ($bRemote ? ' --cmd-ssh=/usr/bin/ssh' : '') . " ${strXlogPath}/${strSourceFile}", + $strCommandPush . ($bRemote ? ' --cmd-ssh=/usr/bin/ssh' : '') . " ${strLogDebug} ${strXlogPath}/${strSourceFile}", {oLogTest => $self->expect()}); push(@stryExpectedWAL, "${strSourceFile}-${strArchiveChecksum}"); # Test that the WAL was pushed $self->archiveCheck($strSourceFile, $strArchiveChecksum, false); + #--------------------------------------------------------------------------------------------------------------------------- + &log(INFO, ' get first WAL'); + + # Remove WAL so it can be recovered + storageTest()->remove("${strXlogPath}/${strSourceFile}", {bIgnoreMissing => false}); + + $oHostDbMaster->executeSimple( + $strCommandGet . " ${strLogDebug} ${strSourceFile} ${strXlogPath}/RECOVERYXLOG", + {oLogTest => $self->expect()}); + + # Check that the destination file exists + if (storageDb()->exists("${strXlogPath}/RECOVERYXLOG")) + { + my ($strActualChecksum) = storageDb()->hashSize("${strXlogPath}/RECOVERYXLOG"); + + if ($strActualChecksum ne $strArchiveChecksum) + { + confess "recovered file hash '${strActualChecksum}' does not match expected '${strArchiveChecksum}'"; + } + } + else + { + confess "archive file '${strXlogPath}/RECOVERYXLOG' is not in destination"; + } + #--------------------------------------------------------------------------------------------------------------------------- &log(INFO, ' push second WAL'); @@ -178,7 +215,7 @@ sub run # Push the WAL $oHostDbMaster->executeSimple( - "${strCommand} --compress --archive-async --process-max=2 ${strXlogPath}/${strSourceFile}", + "${strCommandPush} --compress --archive-async --process-max=2 ${strXlogPath}/${strSourceFile}", {oLogTest => $self->expect()}); push(@stryExpectedWAL, "${strSourceFile}-${strArchiveChecksum}." . COMPRESS_EXT); @@ -203,6 +240,7 @@ sub run # Test that the WAL was pushed $self->archiveCheck($strSourceFile, $strArchiveChecksum, true, $oHostDbMaster->spoolPath()); + # Remove from spool storageTest()->remove($oHostDbMaster->spoolPath() . '/archive/' . $self->stanza() . "/out/${strSourceFile}.ok"); #--------------------------------------------------------------------------------------------------------------------------- @@ -213,7 +251,11 @@ sub run {&INFO_ARCHIVE_SECTION_DB => {&INFO_ARCHIVE_KEY_DB_VERSION => '8.0'}}); $oHostDbMaster->executeSimple( - $strCommand . " ${strXlogPath}/${strSourceFile}", + $strCommandPush . " ${strXlogPath}/${strSourceFile}", + {iExpectedExitStatus => ERROR_ARCHIVE_MISMATCH, oLogTest => $self->expect()}); + + $oHostDbMaster->executeSimple( + $strCommandGet . " ${strSourceFile1} ${strXlogPath}/RECOVERYXLOG", {iExpectedExitStatus => ERROR_ARCHIVE_MISMATCH, oLogTest => $self->expect()}); #--------------------------------------------------------------------------------------------------------------------------- @@ -224,7 +266,11 @@ sub run {&INFO_ARCHIVE_SECTION_DB => {&INFO_BACKUP_KEY_SYSTEM_ID => 5000900090001855000}}); $oHostDbMaster->executeSimple( - $strCommand . " ${strXlogPath}/${strSourceFile}", + $strCommandPush . " ${strXlogPath}/${strSourceFile}", + {iExpectedExitStatus => ERROR_ARCHIVE_MISMATCH, oLogTest => $self->expect()}); + + $oHostDbMaster->executeSimple( + $strCommandGet . " ${strSourceFile1} ${strXlogPath}/RECOVERYXLOG", {iExpectedExitStatus => ERROR_ARCHIVE_MISMATCH, oLogTest => $self->expect()}); # Restore the file to its original condition @@ -236,15 +282,19 @@ sub run $oHostDbMaster->stop({strStanza => $oHostDbMaster->stanza()}); $oHostDbMaster->executeSimple( - $strCommand . " ${strXlogPath}/${strSourceFile}", - {oLogTest => $self->expect(), iExpectedExitStatus => ERROR_STOP}); + $strCommandPush . " ${strXlogPath}/${strSourceFile}", + {iExpectedExitStatus => ERROR_STOP, oLogTest => $self->expect()}); + + $oHostDbMaster->executeSimple( + $strCommandGet . " ${strSourceFile1} ${strXlogPath}/RECOVERYXLOG", + {iExpectedExitStatus => ERROR_STOP, oLogTest => $self->expect()}); $oHostDbMaster->start({strStanza => $oHostDbMaster->stanza()}); #--------------------------------------------------------------------------------------------------------------------------- &log(INFO, ' WAL duplicate ok'); - $oHostDbMaster->executeSimple($strCommand . " ${strXlogPath}/${strSourceFile}", {oLogTest => $self->expect()}); + $oHostDbMaster->executeSimple($strCommandPush . " ${strXlogPath}/${strSourceFile}", {oLogTest => $self->expect()}); #--------------------------------------------------------------------------------------------------------------------------- &log(INFO, ' WAL duplicate error'); @@ -252,15 +302,40 @@ sub run $strArchiveFile = $self->walGenerate($strXlogPath, WAL_VERSION_94, 1, $strSourceFile); $oHostDbMaster->executeSimple( - $strCommand . " ${strXlogPath}/${strSourceFile}", + $strCommandPush . " ${strXlogPath}/${strSourceFile}", {iExpectedExitStatus => ERROR_ARCHIVE_DUPLICATE, oLogTest => $self->expect()}); + #--------------------------------------------------------------------------------------------------------------------------- + &log(INFO, ' get second WAL'); + + # Remove WAL so it can be recovered + storageTest()->remove("${strXlogPath}/${strSourceFile}", {bIgnoreMissing => false}); + + $oHostDbMaster->executeSimple( + $strCommandGet . ($bRemote ? ' --cmd-ssh=/usr/bin/ssh' : '') . " ${strSourceFile} ${strXlogPath}/RECOVERYXLOG", + {oLogTest => $self->expect()}); + + # Check that the destination file exists + if (storageDb()->exists("${strXlogPath}/RECOVERYXLOG")) + { + my ($strActualChecksum) = storageDb()->hashSize("${strXlogPath}/RECOVERYXLOG"); + + if ($strActualChecksum ne $strArchiveChecksum) + { + confess "recovered file hash '${strActualChecksum}' does not match expected '${strArchiveChecksum}'"; + } + } + else + { + confess "archive file '${strXlogPath}/RECOVERYXLOG' is not in destination"; + } + #--------------------------------------------------------------------------------------------------------------------------- &log(INFO, ' .partial WAL'); $strArchiveFile = $self->walGenerate($strXlogPath, WAL_VERSION_94, 2, "${strSourceFile}.partial"); $oHostDbMaster->executeSimple( - $strCommand . " ${strXlogPath}/${strSourceFile}.partial", + $strCommandPush . " ${strXlogPath}/${strSourceFile}.partial", {oLogTest => $self->expect()}); $self->archiveCheck("${strSourceFile}.partial", $strArchiveChecksum, false); @@ -270,7 +345,7 @@ sub run &log(INFO, ' .partial WAL duplicate'); $oHostDbMaster->executeSimple( - $strCommand . " ${strXlogPath}/${strSourceFile}.partial", {oLogTest => $self->expect()}); + $strCommandPush . " ${strXlogPath}/${strSourceFile}.partial", {oLogTest => $self->expect()}); $self->archiveCheck( "${strSourceFile}.partial", $strArchiveChecksum, false); @@ -279,7 +354,7 @@ sub run $strArchiveFile = $self->walGenerate($strXlogPath, WAL_VERSION_94, 1, "${strSourceFile}.partial"); $oHostDbMaster->executeSimple( - $strCommand . " ${strXlogPath}/${strSourceFile}.partial", + $strCommandPush . " ${strXlogPath}/${strSourceFile}.partial", {iExpectedExitStatus => ERROR_ARCHIVE_DUPLICATE, oLogTest => $self->expect()}); #---------------------------------------------------------------------------------------------------------------------------