You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-09 00:45:49 +02:00
Recopy during backup when resumed file is missing or corrupt.
A recopy would occur if the size or checksum was invalid but on error the backup would terminate. Instead, recopy the resumed file on any error. If the error is systemic (e.g. network failure) then it should show up again during the recopy.
This commit is contained in:
@ -234,6 +234,22 @@ testRun(void)
|
||||
storageExistsP(storageRepo(), backupPathFile) && result.pageChecksumResult == NULL),
|
||||
true, " copy");
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------------------
|
||||
TEST_TITLE("resumed file is missing in repo but present in resumed manfest, recopy");
|
||||
|
||||
TEST_ASSIGN(
|
||||
result,
|
||||
backupFile(
|
||||
pgFile, false, 9, strNew("9bc8ab2dda60ef4beed07d1e19ce0676d5edde67"), false, 0, STRDEF(BOGUS_STR), false, false, 1,
|
||||
backupLabel, true, cipherTypeNone, NULL),
|
||||
"backup file");
|
||||
TEST_RESULT_UINT(result.copySize + result.repoSize, 18, " copy=repo=pgFile size");
|
||||
TEST_RESULT_UINT(result.backupCopyResult, backupCopyResultReCopy, " check copy result");
|
||||
TEST_RESULT_BOOL(
|
||||
(strEqZ(result.copyChecksum, "9bc8ab2dda60ef4beed07d1e19ce0676d5edde67") &&
|
||||
storageExistsP(storageRepo(), backupPathFile) && result.pageChecksumResult == NULL),
|
||||
true, " recopy");
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------------------
|
||||
// File exists in repo and db, checksum not same in repo, delta set, ignoreMissing false, no hasReference - RECOPY
|
||||
TEST_RESULT_VOID(
|
||||
|
Reference in New Issue
Block a user