diff --git a/doc/xml/release.xml b/doc/xml/release.xml index f11731669..5baaba25f 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -74,6 +74,9 @@ + + + diff --git a/test/src/module/command/checkTest.c b/test/src/module/command/checkTest.c index f1edc6b57..6fb23aa6c 100644 --- a/test/src/module/command/checkTest.c +++ b/test/src/module/command/checkTest.c @@ -112,8 +112,7 @@ testRun(void) // Only confirming we get passed the check for repoIsLocal || more than one pg-path configured TEST_ERROR( - cmdCheck(), FileMissingError, "unable to open missing file '" TEST_PATH_PG "/" PG_PATH_GLOBAL "/" PG_FILE_PGCONTROL - "' for read"); + cmdCheck(), FileMissingError, "unable to open missing file '" TEST_PATH_PG "/global/pg_control' for read"); //-------------------------------------------------------------------------------------------------------------------------- TEST_TITLE("backup-standby set without standby"); @@ -135,9 +134,8 @@ testRun(void) }); TEST_ERROR( - cmdCheck(), FileMissingError, "unable to open missing file '" TEST_PATH_PG "/" PG_PATH_GLOBAL "/" PG_FILE_PGCONTROL - "' for read"); - TEST_RESULT_LOG("P00 WARN: option '" CFGOPT_BACKUP_STANDBY "' is enabled but standby is not properly configured"); + cmdCheck(), FileMissingError, "unable to open missing file '" TEST_PATH_PG "/global/pg_control' for read"); + TEST_RESULT_LOG("P00 WARN: option 'backup-standby' is enabled but standby is not properly configured"); //-------------------------------------------------------------------------------------------------------------------------- TEST_TITLE("standby and primary database - standby path doesn't match pg_control"); @@ -171,7 +169,7 @@ testRun(void) TEST_ERROR( cmdCheck(), DbMismatchError, "version '" PG_VERSION_92_STR "' and path '" TEST_PATH "' queried from cluster do not match version '" PG_VERSION_92_STR - "' and '" TEST_PATH_PG "' read from '" TEST_PATH_PG "/" PG_PATH_GLOBAL "/" PG_FILE_PGCONTROL "'\n" + "' and '" TEST_PATH_PG "' read from '" TEST_PATH_PG "/global/pg_control'\n" "HINT: the pg1-path and pg1-port settings likely reference different clusters."); //-------------------------------------------------------------------------------------------------------------------------- @@ -426,7 +424,7 @@ testRun(void) TEST_ERROR( checkDbConfig(PG_VERSION_94, db.primaryIdx, db.primary, false), DbMismatchError, "version '" PG_VERSION_92_STR "' and path '" TEST_PATH_PG "' queried from cluster do not match version '" - PG_VERSION_94_STR "' and '" TEST_PATH_PG "' read from '" TEST_PATH_PG "/" PG_PATH_GLOBAL "/" PG_FILE_PGCONTROL "'\n" + PG_VERSION_94_STR "' and '" TEST_PATH_PG "' read from '" TEST_PATH_PG "/global/pg_control'\n" "HINT: the pg1-path and pg1-port settings likely reference different clusters."); //-------------------------------------------------------------------------------------------------------------------------- @@ -435,7 +433,7 @@ testRun(void) TEST_ERROR_FMT( checkDbConfig(PG_VERSION_92, db.standbyIdx, db.standby, true), DbMismatchError, "version '" PG_VERSION_92_STR "' and path '%s' queried from cluster do not match version '" PG_VERSION_92_STR "' and" - " '" TEST_PATH "/pg8' read from '" TEST_PATH "/pg8/" PG_PATH_GLOBAL "/" PG_FILE_PGCONTROL "'\n" + " '" TEST_PATH "/pg8' read from '" TEST_PATH "/pg8/global/pg_control'\n" "HINT: the pg8-path and pg8-port settings likely reference different clusters.", strZ(dbPgDataPath(db.standby))); diff --git a/test/src/module/command/expireTest.c b/test/src/module/command/expireTest.c index ea2d55486..a373f8b55 100644 --- a/test/src/module/command/expireTest.c +++ b/test/src/module/command/expireTest.c @@ -901,24 +901,21 @@ testRun(void) TEST_ERROR( cmdExpire(), CommandError, CFGCMD_EXPIRE " command encountered 2 error(s), check the log file for details"); TEST_RESULT_LOG( - "P00 ERROR: [055]: [DRY-RUN] repo1: unable to load info file '" TEST_PATH_REPO "/backup/db/" INFO_BACKUP_FILE "' or '" - TEST_PATH_REPO "/backup/db/" INFO_BACKUP_FILE INFO_COPY_EXT"':\n" - " FileMissingError: unable to open missing file '" TEST_PATH_REPO "/backup/db/" INFO_BACKUP_FILE - "' for read\n" - " FileMissingError: unable to open missing file '" TEST_PATH_REPO "/backup/db/" INFO_BACKUP_FILE - INFO_COPY_EXT "' for read\n" + "P00 ERROR: [055]: [DRY-RUN] repo1: unable to load info file '" TEST_PATH_REPO "/backup/db/backup.info' or '" + TEST_PATH_REPO "/backup/db/backup.info.copy':\n" + " FileMissingError: unable to open missing file '" TEST_PATH_REPO "/backup/db/backup.info' for read\n" + " FileMissingError: unable to open missing file '" TEST_PATH_REPO "/backup/db/backup.info.copy' for read\n" " HINT: backup.info cannot be opened and is required to perform a backup.\n" " HINT: has a stanza-create been performed?\n" "P00 INFO: [DRY-RUN] repo2: expire diff backup set 20181119-152800F_20181119-152152D," " 20181119-152800F_20181119-152155I\n" "P00 INFO: [DRY-RUN] repo2: remove expired backup 20181119-152800F_20181119-152155I\n" "P00 INFO: [DRY-RUN] repo2: remove expired backup 20181119-152800F_20181119-152152D\n" - "P00 ERROR: [055]: [DRY-RUN] repo2: unable to load info file '" TEST_PATH "/repo2/archive/db/" INFO_ARCHIVE_FILE - "' or '" TEST_PATH "/repo2/archive/db/" INFO_ARCHIVE_FILE INFO_COPY_EXT "':\n" - " FileMissingError: unable to open missing file '" TEST_PATH "/repo2/archive/db/" INFO_ARCHIVE_FILE - "' for read\n" - " FileMissingError: unable to open missing file '" TEST_PATH "/repo2/archive/db/" INFO_ARCHIVE_FILE - INFO_COPY_EXT "' for read\n" + "P00 ERROR: [055]: [DRY-RUN] repo2: unable to load info file '" TEST_PATH "/repo2/archive/db/archive.info' or '" + TEST_PATH "/repo2/archive/db/archive.info.copy':\n" + " FileMissingError: unable to open missing file '" TEST_PATH "/repo2/archive/db/archive.info' for read\n" + " FileMissingError: unable to open missing file '" TEST_PATH "/repo2/archive/db/archive.info.copy'" + " for read\n" " HINT: archive.info cannot be opened but is required to push/get WAL segments.\n" " HINT: is archive_command configured correctly in postgresql.conf?\n" " HINT: has a stanza-create been performed?\n" @@ -934,12 +931,10 @@ testRun(void) TEST_ERROR( cmdExpire(), CommandError, CFGCMD_EXPIRE " command encountered 1 error(s), check the log file for details"); TEST_RESULT_LOG( - "P00 ERROR: [055]: [DRY-RUN] repo1: unable to load info file '" TEST_PATH_REPO "/backup/db/" INFO_BACKUP_FILE "' or '" - TEST_PATH_REPO "/backup/db/" INFO_BACKUP_FILE INFO_COPY_EXT"':\n" - " FileMissingError: unable to open missing file '" TEST_PATH_REPO "/backup/db/" INFO_BACKUP_FILE - "' for read\n" - " FileMissingError: unable to open missing file '" TEST_PATH_REPO "/backup/db/" INFO_BACKUP_FILE - INFO_COPY_EXT "' for read\n" + "P00 ERROR: [055]: [DRY-RUN] repo1: unable to load info file '" TEST_PATH_REPO "/backup/db/backup.info' or '" + TEST_PATH_REPO "/backup/db/backup.info.copy':\n" + " FileMissingError: unable to open missing file '" TEST_PATH_REPO "/backup/db/backup.info' for read\n" + " FileMissingError: unable to open missing file '" TEST_PATH_REPO "/backup/db/backup.info.copy' for read\n" " HINT: backup.info cannot be opened and is required to perform a backup.\n" " HINT: has a stanza-create been performed?\n" "P00 INFO: [DRY-RUN] repo2: expire diff backup set 20181119-152800F_20181119-152152D," @@ -1879,17 +1874,17 @@ testRun(void) TEST_STORAGE_LIST( storageRepo(), STORAGE_REPO_BACKUP, "20181119-152138F/\n" - "20181119-152138F/" BACKUP_MANIFEST_FILE "\n" + "20181119-152138F/backup.manifest\n" "20181119-152800F/\n" - "20181119-152800F/" BACKUP_MANIFEST_FILE "\n" + "20181119-152800F/backup.manifest\n" "20181119-152800F_20181119-152252D/\n" - "20181119-152800F_20181119-152252D/" BACKUP_MANIFEST_FILE "\n" + "20181119-152800F_20181119-152252D/backup.manifest\n" "20181119-152850F/\n" - "20181119-152850F/" BACKUP_MANIFEST_FILE "\n" + "20181119-152850F/backup.manifest\n" "20181119-152900F/\n" - "20181119-152900F/" BACKUP_MANIFEST_FILE "\n" + "20181119-152900F/backup.manifest\n" "20181119-152900F_20181119-153000I/\n" - "20181119-152900F_20181119-153000I/" BACKUP_MANIFEST_FILE INFO_COPY_EXT "\n" + "20181119-152900F_20181119-153000I/backup.manifest.copy\n" "backup.info\n" "backup.info.copy\n" "latest>\n", @@ -1922,15 +1917,15 @@ testRun(void) TEST_STORAGE_LIST( storageRepo(), STORAGE_REPO_BACKUP, "20181119-152800F/\n" - "20181119-152800F/" BACKUP_MANIFEST_FILE "\n" + "20181119-152800F/backup.manifest\n" "20181119-152800F_20181119-152252D/\n" - "20181119-152800F_20181119-152252D/" BACKUP_MANIFEST_FILE "\n" + "20181119-152800F_20181119-152252D/backup.manifest\n" "20181119-152850F/\n" - "20181119-152850F/" BACKUP_MANIFEST_FILE "\n" + "20181119-152850F/backup.manifest\n" "20181119-152900F/\n" - "20181119-152900F/" BACKUP_MANIFEST_FILE "\n" + "20181119-152900F/backup.manifest\n" "20181119-152900F_20181119-153000I/\n" - "20181119-152900F_20181119-153000I/" BACKUP_MANIFEST_FILE INFO_COPY_EXT "\n" + "20181119-152900F_20181119-153000I/backup.manifest.copy\n" "backup.info\n" "backup.info.copy\n" "latest>\n", @@ -1957,11 +1952,11 @@ testRun(void) TEST_STORAGE_LIST( storageRepo(), STORAGE_REPO_BACKUP, "20181119-152800F/\n" - "20181119-152800F/" BACKUP_MANIFEST_FILE "\n" + "20181119-152800F/backup.manifest\n" "20181119-152800F_20181119-152252D/\n" - "20181119-152800F_20181119-152252D/" BACKUP_MANIFEST_FILE "\n" + "20181119-152800F_20181119-152252D/backup.manifest\n" "20181119-152850F/\n" - "20181119-152850F/" BACKUP_MANIFEST_FILE "\n" + "20181119-152850F/backup.manifest\n" "backup.info\n" "backup.info.copy\n" "latest>\n", @@ -2011,7 +2006,7 @@ testRun(void) TEST_STORAGE_LIST( storageRepo(), STORAGE_REPO_BACKUP, "20181119-152850F/\n" - "20181119-152850F/" BACKUP_MANIFEST_FILE "\n" + "20181119-152850F/backup.manifest\n" "backup.info\n" "backup.info.copy\n" "latest>\n", @@ -2149,10 +2144,7 @@ testRun(void) storageRepoWrite(), INFO_BACKUP_PATH_FILE, TEST_BACKUP_CURRENT TEST_BACKUP_DB); - HRN_INFO_PUT( - storageRepoWrite(), INFO_BACKUP_PATH_FILE INFO_COPY_EXT, - TEST_BACKUP_CURRENT - TEST_BACKUP_DB); + HRN_STORAGE_COPY(storageRepo(), INFO_BACKUP_PATH_FILE, storageRepoWrite(), INFO_BACKUP_PATH_FILE INFO_COPY_EXT); // Adhoc backup and resumable backup manifests const String *manifestContent = STRDEF( @@ -2239,9 +2231,6 @@ testRun(void) TEST_BACKUP_DB); HRN_INFO_PUT(storageRepoIdxWrite(1), INFO_BACKUP_PATH_FILE, strZ(backupInfoContent), .cipherType = cipherTypeAes256Cbc); - HRN_INFO_PUT( - storageRepoIdxWrite(1), INFO_BACKUP_PATH_FILE INFO_COPY_EXT, strZ(backupInfoContent), - .cipherType = cipherTypeAes256Cbc); HRN_INFO_PUT( storageRepoIdxWrite(1), STORAGE_REPO_BACKUP "/20181119-152850F/" BACKUP_MANIFEST_FILE, "[backup]\nbackup-type=\"full\"\n", .cipherType = cipherTypeAes256Cbc, .cipherPass = "somepass"); @@ -2250,7 +2239,7 @@ testRun(void) "[backup]\nbackup-type=\"diff\"\n", .cipherType = cipherTypeAes256Cbc, .cipherPass = "somepass"); HRN_INFO_PUT( storageRepoIdxWrite(1), STORAGE_REPO_BACKUP "/20181119-152850F_20181200-152252D/" BACKUP_MANIFEST_FILE INFO_COPY_EXT, - strZ(manifestContent), .cipherType = cipherTypeAes256Cbc, .cipherPass = "somepass"); + strZ(manifestContent), .cipherType = cipherTypeAes256Cbc, .cipherPass = "somepass", .comment = "resumable backup"); // archives to repo2 archiveGenerate(storageRepoIdxWrite(1), STORAGE_REPO_ARCHIVE, 2, 10, "12-2", "0000000100000000"); diff --git a/test/src/module/command/infoTest.c b/test/src/module/command/infoTest.c index 7971cf3af..eaf0c8cb2 100644 --- a/test/src/module/command/infoTest.c +++ b/test/src/module/command/infoTest.c @@ -162,12 +162,12 @@ testRun(void) "\"status\":{" "\"code\":99," "\"message\":\"[FileMissingError] unable to load info file '" - TEST_PATH_REPO "/" STORAGE_PATH_ARCHIVE "/stanza1/" INFO_ARCHIVE_FILE "' or '" - TEST_PATH_REPO "/" STORAGE_PATH_ARCHIVE "/stanza1/" INFO_ARCHIVE_FILE INFO_COPY_EXT "':\\n" - "FileMissingError: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_ARCHIVE - "/stanza1/" INFO_ARCHIVE_FILE "' for read\\n" - "FileMissingError: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_ARCHIVE - "/stanza1/" INFO_ARCHIVE_FILE INFO_COPY_EXT "' for read\\n" + TEST_PATH_REPO "/archive/stanza1/archive.info' or '" + TEST_PATH_REPO "/archive/stanza1/archive.info.copy':\\n" + "FileMissingError: unable to open missing file '" TEST_PATH_REPO "/archive/stanza1/archive.info'" + " for read\\n" + "FileMissingError: unable to open missing file '" TEST_PATH_REPO + "/archive/stanza1/archive.info.copy' for read\\n" "HINT: archive.info cannot be opened but is required to push/get WAL segments.\\n" "HINT: is archive_command configured correctly in postgresql.conf?\\n" "HINT: has a stanza-create been performed?\\n" @@ -190,13 +190,11 @@ testRun(void) infoRender(), "stanza: stanza1\n" " status: error (other)\n" - " [FileMissingError] unable to load info file '" TEST_PATH_REPO "/" STORAGE_PATH_ARCHIVE "/stanza1/" - INFO_ARCHIVE_FILE "' or '" TEST_PATH_REPO "/" STORAGE_PATH_ARCHIVE "/stanza1/" INFO_ARCHIVE_FILE - INFO_COPY_EXT "':\n" - " FileMissingError: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_ARCHIVE "/stanza1/" - INFO_ARCHIVE_FILE "' for read\n" - " FileMissingError: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_ARCHIVE "/stanza1/" - INFO_ARCHIVE_FILE INFO_COPY_EXT "' for read\n" + " [FileMissingError] unable to load info file '" TEST_PATH_REPO "/archive/stanza1/archive.info' or '" + TEST_PATH_REPO "/archive/stanza1/archive.info.copy':\n" + " FileMissingError: unable to open missing file '" TEST_PATH_REPO "/archive/stanza1/archive.info' for read\n" + " FileMissingError: unable to open missing file '" TEST_PATH_REPO "/archive/stanza1/archive.info.copy'" + " for read\n" " HINT: archive.info cannot be opened but is required to push/get WAL segments.\n" " HINT: is archive_command configured correctly in postgresql.conf?\n" " HINT: has a stanza-create been performed?\n" @@ -2248,13 +2246,12 @@ testRun(void) "stanza: stanza1\n" " status: mixed\n" " repo1: error (other)\n" - " [CryptoError] unable to load info file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/stanza1/" - INFO_BACKUP_FILE "' or '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/stanza1/" INFO_BACKUP_FILE - INFO_COPY_EXT "':\n" + " [CryptoError] unable to load info file '" TEST_PATH_REPO "/backup/stanza1/backup.info' or '" + TEST_PATH_REPO "/backup/stanza1/backup.info.copy':\n" " CryptoError: cipher header invalid\n" " HINT: is or was the repo encrypted?\n" - " FileMissingError: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/stanza1/" - INFO_BACKUP_FILE INFO_COPY_EXT "' for read\n" + " FileMissingError: unable to open missing file '" TEST_PATH_REPO "/backup/stanza1/backup.info.copy'" + " for read\n" " HINT: backup.info cannot be opened and is required to perform a backup.\n" " HINT: has a stanza-create been performed?\n" " HINT: use option --stanza if encryption settings are different for the stanza than the global" @@ -2268,13 +2265,12 @@ testRun(void) "stanza: stanza2\n" " status: mixed\n" " repo1: error (other)\n" - " [CryptoError] unable to load info file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/stanza2/" - INFO_BACKUP_FILE "' or '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/stanza2/" INFO_BACKUP_FILE - INFO_COPY_EXT "':\n" + " [CryptoError] unable to load info file '" TEST_PATH_REPO "/backup/stanza2/backup.info' or '" + TEST_PATH_REPO "/backup/stanza2/backup.info.copy':\n" " CryptoError: cipher header invalid\n" " HINT: is or was the repo encrypted?\n" - " FileMissingError: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/stanza2/" - INFO_BACKUP_FILE INFO_COPY_EXT "' for read\n" + " FileMissingError: unable to open missing file '" TEST_PATH_REPO "/backup/stanza2/backup.info.copy'" + " for read\n" " HINT: backup.info cannot be opened and is required to perform a backup.\n" " HINT: has a stanza-create been performed?\n" " HINT: use option --stanza if encryption settings are different for the stanza than the global" @@ -2285,13 +2281,12 @@ testRun(void) "stanza: stanza3\n" " status: mixed\n" " repo1: error (other)\n" - " [CryptoError] unable to load info file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/stanza3/" - INFO_BACKUP_FILE "' or '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/stanza3/" INFO_BACKUP_FILE - INFO_COPY_EXT "':\n" + " [CryptoError] unable to load info file '" TEST_PATH_REPO "/backup/stanza3/backup.info' or '" + TEST_PATH_REPO "/backup/stanza3/backup.info.copy':\n" " CryptoError: cipher header invalid\n" " HINT: is or was the repo encrypted?\n" - " FileMissingError: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/stanza3/" - INFO_BACKUP_FILE INFO_COPY_EXT "' for read\n" + " FileMissingError: unable to open missing file '" TEST_PATH_REPO "/backup/stanza3/backup.info.copy'" + " for read\n" " HINT: backup.info cannot be opened and is required to perform a backup.\n" " HINT: has a stanza-create been performed?\n" " HINT: use option --stanza if encryption settings are different for the stanza than the global" @@ -2322,13 +2317,12 @@ testRun(void) "stanza: stanza3\n" " status: mixed\n" " repo1: error (other)\n" - " [CryptoError] unable to load info file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/stanza3/" - INFO_BACKUP_FILE "' or '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/stanza3/" INFO_BACKUP_FILE - INFO_COPY_EXT "':\n" + " [CryptoError] unable to load info file '" TEST_PATH_REPO "/backup/stanza3/backup.info' or '" + TEST_PATH_REPO "/backup/stanza3/backup.info.copy':\n" " CryptoError: cipher header invalid\n" " HINT: is or was the repo encrypted?\n" - " FileMissingError: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/stanza3/" - INFO_BACKUP_FILE INFO_COPY_EXT "' for read\n" + " FileMissingError: unable to open missing file '" TEST_PATH_REPO "/backup/stanza3/backup.info.copy'" + " for read\n" " HINT: backup.info cannot be opened and is required to perform a backup.\n" " HINT: has a stanza-create been performed?\n" " HINT: use option --stanza if encryption settings are different for the stanza than the global" @@ -2353,8 +2347,8 @@ testRun(void) "stanza: stanza1\n" " status: mixed\n" " repo1: error (other)\n" - " [PathOpenError] unable to list file info for path '" TEST_PATH_REPO "/" STORAGE_PATH_ARCHIVE - "/stanza1/9.4-1': [13] Permission denied\n" + " [PathOpenError] unable to list file info for path '" TEST_PATH_REPO "/archive/stanza1/9.4-1': [13]" + " Permission denied\n" " repo2: error (no valid backups)\n" " cipher: mixed\n" " repo1: none\n" diff --git a/test/src/module/command/stanzaTest.c b/test/src/module/command/stanzaTest.c index 3750c7ffe..ac91d2db6 100644 --- a/test/src/module/command/stanzaTest.c +++ b/test/src/module/command/stanzaTest.c @@ -51,7 +51,7 @@ testRun(void) // Create the stop file, test, then remove the stop file HRN_STORAGE_PUT_EMPTY(storageHrn, strZ(lockStopFileName(cfgOptionStr(cfgOptStanza)))); - TEST_ERROR(cmdStanzaCreate(), StopError, "stop file exists for stanza " TEST_STANZA); + TEST_ERROR(cmdStanzaCreate(), StopError, "stop file exists for stanza db"); HRN_STORAGE_REMOVE(storageHrn, strZ(lockStopFileName(cfgOptionStr(cfgOptStanza)))); //-------------------------------------------------------------------------------------------------------------------------- @@ -66,7 +66,7 @@ testRun(void) hrnPgControlToBuffer((PgControl){.version = PG_VERSION_96, .systemId = 6569239123849665679})); TEST_RESULT_VOID(cmdStanzaCreate(), "stanza create - one repo, no files exist"); - TEST_RESULT_LOG("P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo1"); + TEST_RESULT_LOG("P00 INFO: stanza-create for stanza 'db' on repo1"); HRN_INFO_PUT( storageHrn, "test.info", @@ -126,11 +126,11 @@ testRun(void) TEST_RESULT_VOID(cmdStanzaCreate(), "stanza create - files already exist on repo1 and both are valid"); TEST_RESULT_LOG( - "P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo1\n" - "P00 INFO: stanza '" TEST_STANZA "' already exists on repo1 and is valid\n" - "P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo2\n" - "P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo3\n" - "P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo4"); + "P00 INFO: stanza-create for stanza 'db' on repo1\n" + "P00 INFO: stanza 'db' already exists on repo1 and is valid\n" + "P00 INFO: stanza-create for stanza 'db' on repo2\n" + "P00 INFO: stanza-create for stanza 'db' on repo3\n" + "P00 INFO: stanza-create for stanza 'db' on repo4"); InfoArchive *infoArchive = NULL; TEST_ASSIGN( @@ -189,10 +189,10 @@ testRun(void) TEST_RESULT_VOID(cmdStanzaCreate(), "stanza create - success with missing files"); TEST_RESULT_LOG( - "P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo1\n" - "P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo2\n" - "P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo3\n" - "P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo4"); + "P00 INFO: stanza-create for stanza 'db' on repo1\n" + "P00 INFO: stanza-create for stanza 'db' on repo2\n" + "P00 INFO: stanza-create for stanza 'db' on repo3\n" + "P00 INFO: stanza-create for stanza 'db' on repo4"); TEST_RESULT_BOOL( bufEq( @@ -244,7 +244,7 @@ testRun(void) TEST_ERROR( cmdStanzaDelete(), FileMissingError, - "stop file does not exist for stanza '" TEST_STANZA "'\n" + "stop file does not exist for stanza 'db'\n" "HINT: has the pgbackrest stop command been run on this server for this stanza?"); // Create the stop file @@ -253,13 +253,13 @@ testRun(void) TEST_STORAGE_LIST( storageTest, "repo4", "archive/\n" - "archive/" TEST_STANZA "/\n" - "archive/" TEST_STANZA "/archive.info\n" - "archive/" TEST_STANZA "/archive.info.copy\n" + "archive/db/\n" + "archive/db/archive.info\n" + "archive/db/archive.info.copy\n" "backup/\n" - "backup/" TEST_STANZA "/\n" - "backup/" TEST_STANZA "/backup.info\n" - "backup/" TEST_STANZA "/backup.info.copy\n", + "backup/db/\n" + "backup/db/backup.info\n" + "backup/db/backup.info.copy\n", .comment = "stanza exists in repo4"); TEST_RESULT_VOID(cmdStanzaDelete(), "stanza delete - repo4"); @@ -308,9 +308,9 @@ testRun(void) "archive.info exists but backup.info is missing on repo2\n" "HINT: this may be a symptom of repository corruption!"); TEST_RESULT_LOG( - "P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo1\n" - "P00 INFO: stanza '" TEST_STANZA "' already exists on repo1 and is valid\n" - "P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo2"); + "P00 INFO: stanza-create for stanza 'db' on repo1\n" + "P00 INFO: stanza 'db' already exists on repo1 and is valid\n" + "P00 INFO: stanza-create for stanza 'db' on repo2"); // Archive files removed - backup.info and backup.info.copy exist repo1 TEST_STORAGE_EXISTS( @@ -323,7 +323,7 @@ testRun(void) cmdStanzaCreate(), FileMissingError, "backup.info exists but archive.info is missing on repo1\n" "HINT: this may be a symptom of repository corruption!"); - TEST_RESULT_LOG("P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo1"); + TEST_RESULT_LOG("P00 INFO: stanza-create for stanza 'db' on repo1"); // Delete the last repo so only 1 remains argListDelete = strLstDup(argListCmd); @@ -348,7 +348,7 @@ testRun(void) cmdStanzaCreate(), FileMissingError, "backup.info exists but archive.info is missing on repo1\n" "HINT: this may be a symptom of repository corruption!"); - TEST_RESULT_LOG("P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo1"); + TEST_RESULT_LOG("P00 INFO: stanza-create for stanza 'db' on repo1"); // Archive files removed - backup.info.copy exists, backup.info moved to backup.info.copy HRN_STORAGE_MOVE(storageRepoIdxWrite(0), INFO_BACKUP_PATH_FILE, INFO_BACKUP_PATH_FILE INFO_COPY_EXT); @@ -356,7 +356,7 @@ testRun(void) cmdStanzaCreate(), FileMissingError, "backup.info exists but archive.info is missing on repo1\n" "HINT: this may be a symptom of repository corruption!"); - TEST_RESULT_LOG("P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo1"); + TEST_RESULT_LOG("P00 INFO: stanza-create for stanza 'db' on repo1"); // Backup files removed - archive.info file exists HRN_INFO_PUT( @@ -376,7 +376,7 @@ testRun(void) cmdStanzaCreate(), FileMissingError, "archive.info exists but backup.info is missing on repo1\n" "HINT: this may be a symptom of repository corruption!"); - TEST_RESULT_LOG("P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo1"); + TEST_RESULT_LOG("P00 INFO: stanza-create for stanza 'db' on repo1"); // Backup files removed - archive.info.copy file exists (renamed from archive.info) HRN_STORAGE_MOVE(storageRepoIdxWrite(0), INFO_ARCHIVE_PATH_FILE, INFO_ARCHIVE_PATH_FILE INFO_COPY_EXT); @@ -384,7 +384,7 @@ testRun(void) cmdStanzaCreate(), FileMissingError, "archive.info exists but backup.info is missing on repo1\n" "HINT: this may be a symptom of repository corruption!"); - TEST_RESULT_LOG("P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo1"); + TEST_RESULT_LOG("P00 INFO: stanza-create for stanza 'db' on repo1"); //-------------------------------------------------------------------------------------------------------------------------- TEST_TITLE("checkStanzaInfo() - already checked in checkTest so just a sanity check here"); @@ -410,7 +410,7 @@ testRun(void) "archive: id = 1, version = 9.6, system-id = 6569239123849665679\n" "backup : id = 2, version = 9.6, system-id = 6569239123849665679\n" "HINT: this may be a symptom of repository corruption!"); - TEST_RESULT_LOG("P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo1"); + TEST_RESULT_LOG("P00 INFO: stanza-create for stanza 'db' on repo1"); //-------------------------------------------------------------------------------------------------------------------------- TEST_TITLE("archive.info file and backup.info files that match but do not match the current database version"); @@ -449,7 +449,7 @@ testRun(void) "backup and archive info files exist but do not match the database\n" "HINT: is this the correct stanza?\n" "HINT: did an error occur during stanza-upgrade?"); - TEST_RESULT_LOG("P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo1"); + TEST_RESULT_LOG("P00 INFO: stanza-create for stanza 'db' on repo1"); //-------------------------------------------------------------------------------------------------------------------------- TEST_TITLE("archive.info and backup.info files that match but do not match the current database system-id"); @@ -482,7 +482,7 @@ testRun(void) "backup and archive info files exist but do not match the database\n" "HINT: is this the correct stanza?\n" "HINT: did an error occur during stanza-upgrade?"); - TEST_RESULT_LOG("P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo1"); + TEST_RESULT_LOG("P00 INFO: stanza-create for stanza 'db' on repo1"); // Remove the info files and add sub directory to backup TEST_STORAGE_EXISTS(storageRepoIdxWrite(0), INFO_ARCHIVE_PATH_FILE, .remove = true); @@ -491,17 +491,17 @@ testRun(void) storageRepoIdxWrite(0), STORAGE_REPO_BACKUP "/backup.history", .comment = "create directory in backup"); TEST_ERROR(cmdStanzaCreate(), PathNotEmptyError, "backup directory not empty"); - TEST_RESULT_LOG("P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo1"); + TEST_RESULT_LOG("P00 INFO: stanza-create for stanza 'db' on repo1"); // File in archive, directory in backup HRN_STORAGE_PUT_Z(storageRepoIdxWrite(0), STORAGE_REPO_ARCHIVE "/somefile", "some content"); TEST_ERROR(cmdStanzaCreate(), PathNotEmptyError, "backup directory and/or archive directory not empty"); - TEST_RESULT_LOG("P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo1"); + TEST_RESULT_LOG("P00 INFO: stanza-create for stanza 'db' on repo1"); // File in archive, backup empty HRN_STORAGE_PATH_REMOVE(storageRepoIdxWrite(0), STORAGE_REPO_BACKUP "/backup.history", .comment = "remove backup subdir"); TEST_ERROR(cmdStanzaCreate(), PathNotEmptyError, "archive directory not empty"); - TEST_RESULT_LOG("P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo1"); + TEST_RESULT_LOG("P00 INFO: stanza-create for stanza 'db' on repo1"); //-------------------------------------------------------------------------------------------------------------------------- TEST_TITLE("repeat last test using --force (deprecated)"); @@ -511,7 +511,7 @@ testRun(void) TEST_ERROR(cmdStanzaCreate(), PathNotEmptyError, "archive directory not empty"); TEST_RESULT_LOG( "P00 WARN: option --force is no longer supported\n" - "P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo1"); + "P00 INFO: stanza-create for stanza 'db' on repo1"); } // ***************************************************************************************************************************** @@ -539,17 +539,17 @@ testRun(void) }); TEST_RESULT_VOID(cmdStanzaCreate(), "stanza create - db online"); - TEST_RESULT_LOG("P00 INFO: stanza-create for stanza '" TEST_STANZA "' on repo1"); + TEST_RESULT_LOG("P00 INFO: stanza-create for stanza 'db' on repo1"); TEST_STORAGE_LIST( storageTest, TEST_PATH_REPO, "archive/\n" - "archive/" TEST_STANZA "/\n" - "archive/" TEST_STANZA "/archive.info\n" - "archive/" TEST_STANZA "/archive.info.copy\n" + "archive/db/\n" + "archive/db/archive.info\n" + "archive/db/archive.info.copy\n" "backup/\n" - "backup/" TEST_STANZA "/\n" - "backup/" TEST_STANZA "/backup.info\n" - "backup/" TEST_STANZA "/backup.info.copy\n", + "backup/db/\n" + "backup/db/backup.info\n" + "backup/db/backup.info.copy\n", .comment = "stanza created"); HRN_CFG_LOAD(cfgCmdStanzaUpgrade, argList); @@ -561,8 +561,8 @@ testRun(void) TEST_RESULT_VOID(cmdStanzaUpgrade(), "stanza upgrade - db online"); TEST_RESULT_LOG( - "P00 INFO: stanza-upgrade for stanza '" TEST_STANZA "' on repo1\n" - "P00 INFO: stanza '" TEST_STANZA "' on repo1 is already up to date"); + "P00 INFO: stanza-upgrade for stanza 'db' on repo1\n" + "P00 INFO: stanza 'db' on repo1 is already up to date"); //-------------------------------------------------------------------------------------------------------------------------- TEST_TITLE("pg_control and version mismatch"); @@ -580,8 +580,8 @@ testRun(void) TEST_ERROR( pgValidate(), DbMismatchError, - "version '" PG_VERSION_92_STR "' and path '" TEST_PATH_PG "' queried from cluster do not match version '" PG_VERSION_91_STR "' and " - "'" TEST_PATH_PG "' read from '" TEST_PATH_PG "/" PG_PATH_GLOBAL "/" PG_FILE_PGCONTROL "'\n" + "version '" PG_VERSION_92_STR "' and path '" TEST_PATH_PG "' queried from cluster do not match version '" + PG_VERSION_91_STR "' and '" TEST_PATH_PG "' read from '" TEST_PATH_PG "/" PG_PATH_GLOBAL "/" PG_FILE_PGCONTROL "'\n" "HINT: the pg1-path and pg1-port settings likely reference different clusters."); //-------------------------------------------------------------------------------------------------------------------------- @@ -659,7 +659,7 @@ testRun(void) // Create the stop file, test and remove HRN_STORAGE_PUT_EMPTY(storageHrn, strZ(lockStopFileName(cfgOptionStr(cfgOptStanza)))); - TEST_ERROR(cmdStanzaUpgrade(), StopError, "stop file exists for stanza " TEST_STANZA); + TEST_ERROR(cmdStanzaUpgrade(), StopError, "stop file exists for stanza db"); HRN_STORAGE_REMOVE(storageHrn, strZ(lockStopFileName(cfgOptionStr(cfgOptStanza)))); //-------------------------------------------------------------------------------------------------------------------------- @@ -702,7 +702,7 @@ testRun(void) "archive: id = 2, version = 9.6, system-id = 6569239123849665679\n" "backup : id = 1, version = 9.6, system-id = 6569239123849665679\n" "HINT: this may be a symptom of repository corruption!"); - TEST_RESULT_LOG("P00 INFO: stanza-upgrade for stanza '" TEST_STANZA "' on repo1"); + TEST_RESULT_LOG("P00 INFO: stanza-upgrade for stanza 'db' on repo1"); //-------------------------------------------------------------------------------------------------------------------------- TEST_TITLE("stanza-upgrade - info file mismatch: archive version"); @@ -733,7 +733,7 @@ testRun(void) "1={\"db-id\":6569239123849665679,\"db-version\":\"9.5\"}\n"); TEST_RESULT_VOID(cmdStanzaUpgrade(), "stanza upgrade - archive.info file upgraded - version"); - TEST_RESULT_LOG("P00 INFO: stanza-upgrade for stanza '" TEST_STANZA "' on repo1"); + TEST_RESULT_LOG("P00 INFO: stanza-upgrade for stanza 'db' on repo1"); HRN_INFO_PUT( storageHrn, "test.info", @@ -830,7 +830,7 @@ testRun(void) "1={\"db-id\":6569239123849665999,\"db-version\":\"9.6\"}\n"); TEST_RESULT_VOID(cmdStanzaUpgrade(), "stanza upgrade - archive.info file upgraded - system-id"); - TEST_RESULT_LOG("P00 INFO: stanza-upgrade for stanza '" TEST_STANZA "' on repo1"); + TEST_RESULT_LOG("P00 INFO: stanza-upgrade for stanza 'db' on repo1"); HRN_INFO_PUT( storageHrn, "test.info", @@ -871,7 +871,7 @@ testRun(void) "\"db-version\":\"9.6\"}\n"); TEST_RESULT_VOID(cmdStanzaUpgrade(), "stanza upgrade - backup.info file upgraded - system-id"); - TEST_RESULT_LOG("P00 INFO: stanza-upgrade for stanza '" TEST_STANZA "' on repo1"); + TEST_RESULT_LOG("P00 INFO: stanza-upgrade for stanza 'db' on repo1"); HRN_INFO_PUT( storageHrn, "test.info", @@ -918,7 +918,7 @@ testRun(void) hrnPgControlToBuffer((PgControl){.version = PG_VERSION_96, .systemId = 6569239123849665679})); TEST_RESULT_VOID(cmdStanzaCreate(), "create a stanza that will not be deleted"); - TEST_RESULT_LOG("P00 INFO: stanza-create for stanza '" TEST_STANZA_OTHER "' on repo1"); + TEST_RESULT_LOG("P00 INFO: stanza-create for stanza 'otherstanza' on repo1"); argList = strLstDup(argListCmd); hrnCfgArgRawZ(argList, cfgOptStanza, TEST_STANZA); @@ -939,10 +939,10 @@ testRun(void) // Confirm stanza does not exist TEST_STORAGE_LIST( - storageTest, "repo/archive", TEST_STANZA_OTHER "/\n", .noRecurse=true, + storageTest, "repo/archive", "otherstanza/\n", .noRecurse=true, .comment = "stanza '" TEST_STANZA "' archive does not exist"); TEST_STORAGE_LIST( - storageTest, "repo/backup", TEST_STANZA_OTHER "/\n", .noRecurse=true, + storageTest, "repo/backup", "otherstanza/\n", .noRecurse=true, .comment = "stanza '" TEST_STANZA "' backup does not exist"); // Create stanza archive only @@ -951,13 +951,13 @@ testRun(void) HRN_STORAGE_PUT_EMPTY(storageHrn, strZ(lockStopFileName(cfgOptionStr(cfgOptStanza))), .comment = "create stop file"); TEST_STORAGE_LIST( storageTest, "repo/archive", - TEST_STANZA "/\n" - TEST_STANZA_OTHER "/\n", + "db/\n" + "otherstanza/\n", .noRecurse = true, .comment = "stanza archive exists"); TEST_RESULT_VOID(cmdStanzaDelete(), "stanza delete - archive only"); TEST_STORAGE_LIST( - storageTest, "repo/archive", TEST_STANZA_OTHER "/\n", .noRecurse=true, .comment = "stanza '" TEST_STANZA "' deleted"); + storageTest, "repo/archive", "otherstanza/\n", .noRecurse=true, .comment = "stanza '" TEST_STANZA "' deleted"); //-------------------------------------------------------------------------------------------------------------------------- TEST_TITLE("stanza-delete - only backup exists"); @@ -969,13 +969,13 @@ testRun(void) HRN_STORAGE_PUT_EMPTY(storageHrn, strZ(lockStopFileName(cfgOptionStr(cfgOptStanza))), .comment = "create stop file"); TEST_STORAGE_LIST( storageTest, "repo/backup", - TEST_STANZA "/\n" - TEST_STANZA_OTHER "/\n", + "db/\n" + "otherstanza/\n", .noRecurse = true, .comment = "stanza backup exists"); TEST_RESULT_VOID(cmdStanzaDelete(), "stanza delete - backup only"); TEST_STORAGE_LIST( - storageTest, "repo/backup", TEST_STANZA_OTHER "/\n", .noRecurse=true, .comment = "stanza '" TEST_STANZA "' deleted"); + storageTest, "repo/backup", "otherstanza/\n", .noRecurse=true, .comment = "stanza '" TEST_STANZA "' deleted"); //-------------------------------------------------------------------------------------------------------------------------- TEST_TITLE("stanza-delete - error on file that looks like backup directory"); @@ -986,8 +986,8 @@ testRun(void) HRN_STORAGE_PUT_EMPTY(storageHrn, strZ(lockStopFileName(cfgOptionStr(cfgOptStanza))), .comment = "create stop file"); TEST_ERROR( cmdStanzaDelete(), FileRemoveError, - "unable to remove '" TEST_PATH_REPO "/backup/" TEST_STANZA "/20190708-154306F/backup.manifest': [20] Not a directory"); - HRN_STORAGE_REMOVE(storageTest, "repo/backup/" TEST_STANZA "/20190708-154306F", "cleanup - remove backup file"); + "unable to remove '" TEST_PATH_REPO "/backup/db/20190708-154306F/backup.manifest': [20] Not a directory"); + HRN_STORAGE_REMOVE(storageTest, "repo/backup/db/20190708-154306F", "cleanup - remove backup file"); //-------------------------------------------------------------------------------------------------------------------------- TEST_TITLE("manifestDelete()"); @@ -1028,7 +1028,7 @@ testRun(void) TEST_RESULT_VOID(cmdStanzaDelete(), "stanza delete - empty directories"); TEST_STORAGE_LIST( - storageTest, "repo/archive", TEST_STANZA_OTHER "/\n", .noRecurse=true, .comment = "stanza '" TEST_STANZA "' deleted"); + storageTest, "repo/archive", "otherstanza/\n", .noRecurse=true, .comment = "stanza '" TEST_STANZA "' deleted"); //-------------------------------------------------------------------------------------------------------------------------- TEST_TITLE("delete errors when pg appears to be running"); @@ -1040,8 +1040,7 @@ testRun(void) TEST_ERROR( cmdStanzaDelete(), PgRunningError, PG_FILE_POSTMASTERPID " exists - looks like " PG_NAME " is running. " - "To delete stanza '" TEST_STANZA "' on repo1, shut down " PG_NAME " for stanza '" TEST_STANZA - "' and try again, or use --force."); + "To delete stanza 'db' on repo1, shut down " PG_NAME " for stanza 'db' and try again, or use --force."); // Specify repo option StringList *argListDel = strLstDup(argList); @@ -1053,8 +1052,7 @@ testRun(void) TEST_ERROR( cmdStanzaDelete(), PgRunningError, PG_FILE_POSTMASTERPID " exists - looks like " PG_NAME " is running. " - "To delete stanza '" TEST_STANZA "' on repo2, shut down " PG_NAME " for stanza '" TEST_STANZA - "' and try again, or use --force."); + "To delete stanza 'db' on repo2, shut down " PG_NAME " for stanza 'db' and try again, or use --force."); //-------------------------------------------------------------------------------------------------------------------------- TEST_TITLE("force delete when pg appears to be running, multi-repo"); diff --git a/test/src/module/command/verifyTest.c b/test/src/module/command/verifyTest.c index 20d443ddd..ff97128ad 100644 --- a/test/src/module/command/verifyTest.c +++ b/test/src/module/command/verifyTest.c @@ -254,9 +254,9 @@ testRun(void) TEST_RESULT_PTR(manifest, NULL, "manifest not set - pg version mismatch"); TEST_RESULT_UINT(backupResult.status, backupInvalid, "manifest unusable - backup invalid"); TEST_RESULT_LOG( - "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/db/" TEST_BACKUP_LABEL_FULL "/" - BACKUP_MANIFEST_FILE INFO_COPY_EXT "' for read\n" - "P00 ERROR: [028]: '" TEST_BACKUP_LABEL_FULL "' may not be recoverable - PG data (id 1, version 9.2, system-id " + "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/backup/db/20181119-152138F/backup.manifest.copy'" + " for read\n" + "P00 ERROR: [028]: '20181119-152138F' may not be recoverable - PG data (id 1, version 9.2, system-id " "6625592122879095702) is not in the backup.info history, skipping"); //-------------------------------------------------------------------------------------------------------------------------- @@ -289,10 +289,9 @@ testRun(void) TEST_RESULT_PTR(manifest, NULL, "manifest not set - pg system-id mismatch"); TEST_RESULT_UINT(backupResult.status, backupInvalid, "manifest unusable - backup invalid"); TEST_RESULT_LOG( - "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/db/" TEST_BACKUP_LABEL_FULL "/" - BACKUP_MANIFEST_FILE "' for read\n" - "P00 WARN: " TEST_BACKUP_LABEL_FULL "/backup.manifest is missing or unusable, using copy\n" - "P00 ERROR: [028]: '" TEST_BACKUP_LABEL_FULL "' may not be recoverable - PG data (id 1, version 9.4, system-id 0) is " + "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/backup/db/20181119-152138F/backup.manifest' for read\n" + "P00 WARN: 20181119-152138F/backup.manifest is missing or unusable, using copy\n" + "P00 ERROR: [028]: '20181119-152138F' may not be recoverable - PG data (id 1, version 9.4, system-id 0) is " "not in the backup.info history, skipping"); //-------------------------------------------------------------------------------------------------------------------------- @@ -324,10 +323,9 @@ testRun(void) TEST_RESULT_PTR(manifest, NULL, "manifest not set - pg db-id mismatch"); TEST_RESULT_UINT(backupResult.status, backupInvalid, "manifest unusable - backup invalid"); TEST_RESULT_LOG( - "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/db/" TEST_BACKUP_LABEL_FULL "/" - BACKUP_MANIFEST_FILE "' for read\n" - "P00 WARN: " TEST_BACKUP_LABEL_FULL "/backup.manifest is missing or unusable, using copy\n" - "P00 ERROR: [028]: '" TEST_BACKUP_LABEL_FULL "' may not be recoverable - PG data (id 0, version 9.4, system-id " + "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/backup/db/20181119-152138F/backup.manifest' for read\n" + "P00 WARN: 20181119-152138F/backup.manifest is missing or unusable, using copy\n" + "P00 ERROR: [028]: '20181119-152138F' may not be recoverable - PG data (id 0, version 9.4, system-id " "6625592122879095702) is not in the backup.info history, skipping"); //-------------------------------------------------------------------------------------------------------------------------- @@ -342,10 +340,9 @@ testRun(void) TEST_ASSIGN(manifest, verifyManifestFile(&backupResult, NULL, false, infoPg, &jobErrorTotal), "verify manifest"); TEST_RESULT_UINT(backupResult.status, backupInvalid, "manifest unusable - backup invalid"); TEST_RESULT_LOG( - "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/db/" TEST_BACKUP_LABEL_FULL "/" - BACKUP_MANIFEST_FILE "' for read\n" + "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/backup/db/20181119-152138F/backup.manifest' for read\n" "P00 WARN: invalid checksum, actual 'e056f784a995841fd4e2802b809299b8db6803a2' but expected 'BOGUS' " - STORAGE_REPO_BACKUP "/" TEST_BACKUP_LABEL_FULL "/" BACKUP_MANIFEST_FILE INFO_COPY_EXT); + "/20181119-152138F/backup.manifest.copy"); //-------------------------------------------------------------------------------------------------------------------------- TEST_TITLE("current backup true"); @@ -359,9 +356,9 @@ testRun(void) TEST_RESULT_UINT(backupResult.status, backupInvalid, "manifest unusable - backup invalid"); TEST_RESULT_LOG( "P00 WARN: invalid checksum, actual 'e056f784a995841fd4e2802b809299b8db6803a2' but expected 'BOGUS' " - STORAGE_REPO_BACKUP "/" TEST_BACKUP_LABEL_FULL "/" BACKUP_MANIFEST_FILE "\n" + "/20181119-152138F/backup.manifest\n" "P00 WARN: invalid checksum, actual 'e056f784a995841fd4e2802b809299b8db6803a2' but expected 'BOGUS' " - STORAGE_REPO_BACKUP "/" TEST_BACKUP_LABEL_FULL "/" BACKUP_MANIFEST_FILE INFO_COPY_EXT); + "/20181119-152138F/backup.manifest.copy"); // Write a valid manifest with a manifest copy that is invalid HRN_INFO_PUT( @@ -383,7 +380,7 @@ testRun(void) TEST_ASSIGN(manifest, verifyManifestFile(&backupResult, NULL, true, infoPg, &jobErrorTotal), "verify manifest"); TEST_RESULT_PTR_NE(manifest, NULL, "manifest set"); TEST_RESULT_UINT(backupResult.status, backupValid, "manifest usable"); - TEST_RESULT_LOG("P00 WARN: backup '" TEST_BACKUP_LABEL_FULL "' manifest.copy does not match manifest"); + TEST_RESULT_LOG("P00 WARN: backup '20181119-152138F' manifest.copy does not match manifest"); } // ***************************************************************************************************************************** @@ -760,13 +757,10 @@ testRun(void) TEST_RESULT_LOG( "P00 WARN: invalid checksum, actual 'e056f784a995841fd4e2802b809299b8db6803a2' but expected 'BOGUS' " "/backup.info\n" - "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/db/" INFO_BACKUP_FILE INFO_COPY_EXT - "' for read\n" + "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/backup/db/backup.info.copy' for read\n" "P00 ERROR: [029]: No usable backup.info file\n" - "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_ARCHIVE "/db/" INFO_ARCHIVE_FILE - "' for read\n" - "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_ARCHIVE "/db/" INFO_ARCHIVE_FILE - INFO_COPY_EXT "' for read\n" + "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/archive/db/archive.info' for read\n" + "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/archive/db/archive.info.copy' for read\n" "P00 ERROR: [029]: No usable archive.info file"); //-------------------------------------------------------------------------------------------------------------------------- @@ -790,8 +784,7 @@ testRun(void) TEST_RESULT_LOG( "P00 WARN: invalid checksum, actual 'e056f784a995841fd4e2802b809299b8db6803a2' but expected 'BOGUS'" " /backup.info\n" - "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_ARCHIVE "/db/" INFO_ARCHIVE_FILE - "' for read\n" + "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/archive/db/archive.info' for read\n" "P00 WARN: invalid checksum, actual 'e056f784a995841fd4e2802b809299b8db6803a2' but expected 'BOGUS'" " /archive.info.copy\n" "P00 ERROR: [029]: No usable archive.info file"); @@ -835,10 +828,8 @@ testRun(void) HRN_STORAGE_REMOVE(storageRepoWrite(), INFO_ARCHIVE_PATH_FILE INFO_COPY_EXT, .comment = "remove archive.info.copy"); TEST_RESULT_VOID(cmdVerify(), "usable backup and archive info files"); TEST_RESULT_LOG( - "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/db/" INFO_BACKUP_FILE - INFO_COPY_EXT "' for read\n" - "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_ARCHIVE "/db/" INFO_ARCHIVE_FILE - INFO_COPY_EXT "' for read\n" + "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/backup/db/backup.info.copy' for read\n" + "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/archive/db/archive.info.copy' for read\n" "P00 WARN: no archives or backups exist in the repo"); //-------------------------------------------------------------------------------------------------------------------------- @@ -850,10 +841,8 @@ testRun(void) .comment = "valid and matching archive.info.copy"); TEST_ERROR(cmdVerify(), RuntimeError, "1 fatal errors encountered, see log for details"); TEST_RESULT_LOG( - "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/db/" INFO_BACKUP_FILE - "' for read\n" - "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/db/" INFO_BACKUP_FILE - INFO_COPY_EXT "' for read\n" + "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/backup/db/backup.info' for read\n" + "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/backup/db/backup.info.copy' for read\n" "P00 ERROR: [029]: No usable backup.info file"); } @@ -1182,25 +1171,23 @@ testRun(void) "'11-2/0000000200000007/000000020000000700000FFF-ee161f898c9012dd0c28b3fd1e7140b9cf411306'\n" "P01 ERROR: [039]: invalid result " "11-2/0000000200000008/000000020000000800000003-656817043007aa2100c44c712bcb456db705dab9: [41] raised from " - "local-1 shim protocol: unable to open file '" TEST_PATH_REPO "/" STORAGE_PATH_ARCHIVE "/db/" + "local-1 shim protocol: unable to open file '" TEST_PATH_REPO "/archive/db/" "11-2/0000000200000008/000000020000000800000003-656817043007aa2100c44c712bcb456db705dab9' for read:" " [13] Permission denied\n" - "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/db/20181119-152800F/" - BACKUP_MANIFEST_FILE "' for read\n" - "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/db/20181119-152800F/" - BACKUP_MANIFEST_FILE INFO_COPY_EXT "' for read\n" + "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/backup/db/20181119-152800F/backup.manifest' for read\n" + "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/backup/db/20181119-152800F/backup.manifest.copy'" + " for read\n" "P00 WARN: manifest missing for '20181119-152800F' - backup may have expired\n" - "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/db/20181119-152810F/" - BACKUP_MANIFEST_FILE INFO_COPY_EXT "' for read\n" + "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/backup/db/20181119-152810F/backup.manifest.copy'" + " for read\n" "P00 ERROR: [028]: backup '20181119-152810F' manifest does not contain any target files to verify\n" "P01 ERROR: [028]: invalid checksum '20181119-152900F/pg_data/PG_VERSION'\n" "P01 ERROR: [028]: file missing '20181119-152900F_20181119-152909D/pg_data/testmissing'\n" - "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/db/20181119-153000F/" - BACKUP_MANIFEST_FILE "' for read\n" + "P00 WARN: unable to open missing file '" TEST_PATH_REPO "/backup/db/20181119-153000F/backup.manifest' for read\n" "P00 INFO: backup '20181119-153000F' appears to be in progress, skipping\n" "P01 ERROR: [039]: invalid result UNPROCESSEDBACKUP/pg_data/testother: [41] raised from local-1 shim protocol:" - " unable to open file '" TEST_PATH_REPO "/" STORAGE_PATH_BACKUP "/db/UNPROCESSEDBACKUP/pg_data/testother'" - " for read: [13] Permission denied\n" + " unable to open file '" TEST_PATH_REPO "/backup/db/UNPROCESSEDBACKUP/pg_data/testother' for read: [13]" + " Permission denied\n" "P00 DETAIL: archiveId: 11-2, wal start: 000000020000000700000FFD, wal stop: 000000020000000800000000\n" "P00 DETAIL: archiveId: 11-2, wal start: 000000020000000800000002, wal stop: 000000020000000800000003\n" "P00 DETAIL: archiveId: 11-2, wal start: 000000030000000000000000, wal stop: 000000030000000000000001\n"