You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-15 01:04:37 +02:00
Convert BackupType enum to StringId.
Allows removal of backupType()/backupTypeStr() and improves debug logging of the enum. Move BackupType enum and string constants to info/infoBackup.h so they are available to more modules. Also convert InfoBackup to use BackupType instead of a String.
This commit is contained in:
@ -1240,7 +1240,7 @@ testRun(void)
|
||||
hrnCfgArgRaw(argList, cfgOptRepoPath, repoPath);
|
||||
hrnCfgArgRawZ(argList, cfgOptPgPath, "/pg");
|
||||
hrnCfgArgRawZ(argList, cfgOptRepoRetentionFull, "1");
|
||||
strLstAddZ(argList, "--" CFGOPT_TYPE "=" BACKUP_TYPE_FULL);
|
||||
hrnCfgArgRawStrId(argList, cfgOptType, backupTypeFull);
|
||||
strLstAddZ(argList, "--no-" CFGOPT_COMPRESS);
|
||||
harnessCfgLoad(cfgCmdBackup, argList);
|
||||
|
||||
@ -1512,7 +1512,7 @@ testRun(void)
|
||||
strLstAddZ(argList, "--no-" CFGOPT_ONLINE);
|
||||
strLstAddZ(argList, "--" CFGOPT_COMPRESS);
|
||||
hrnCfgArgRawBool(argList, cfgOptRepoHardlink, true);
|
||||
strLstAddZ(argList, "--" CFGOPT_TYPE "=" BACKUP_TYPE_DIFF);
|
||||
hrnCfgArgRawStrId(argList, cfgOptType, backupTypeDiff);
|
||||
harnessCfgLoad(cfgCmdBackup, argList);
|
||||
|
||||
TEST_ERROR(cmdBackup(), FileMissingError, "no files have changed since the last backup - this seems unlikely");
|
||||
@ -1533,7 +1533,7 @@ testRun(void)
|
||||
strLstAddZ(argList, "--no-" CFGOPT_ONLINE);
|
||||
strLstAddZ(argList, "--no-" CFGOPT_COMPRESS);
|
||||
strLstAddZ(argList, "--" CFGOPT_CHECKSUM_PAGE);
|
||||
strLstAddZ(argList, "--" CFGOPT_TYPE "=" BACKUP_TYPE_INCR);
|
||||
hrnCfgArgRawStrId(argList, cfgOptType, backupTypeIncr);
|
||||
harnessCfgLoad(cfgCmdBackup, argList);
|
||||
|
||||
storagePutP(storageNewWriteP(storagePgWrite(), PG_FILE_PGVERSION_STR), BUFSTRDEF("VER"));
|
||||
@ -1560,7 +1560,7 @@ testRun(void)
|
||||
hrnCfgArgRawZ(argList, cfgOptRepoRetentionFull, "1");
|
||||
strLstAddZ(argList, "--no-" CFGOPT_ONLINE);
|
||||
strLstAddZ(argList, "--no-" CFGOPT_COMPRESS);
|
||||
strLstAddZ(argList, "--" CFGOPT_TYPE "=" BACKUP_TYPE_DIFF);
|
||||
hrnCfgArgRawStrId(argList, cfgOptType, backupTypeDiff);
|
||||
harnessCfgLoad(cfgCmdBackup, argList);
|
||||
|
||||
sleepMSec(MSEC_PER_SEC - (timeMSec() % MSEC_PER_SEC));
|
||||
@ -1598,7 +1598,7 @@ testRun(void)
|
||||
|
||||
// With repo2 the only repo configured, ensure it is chosen by confirming diff is changed to full due to no prior backups
|
||||
hrnCfgArgKeyRawZ(argList, cfgOptRepoRetentionFull, 2, "1");
|
||||
hrnCfgArgRawZ(argList, cfgOptType, BACKUP_TYPE_DIFF);
|
||||
hrnCfgArgRawStrId(argList, cfgOptType, backupTypeDiff);
|
||||
harnessCfgLoad(cfgCmdBackup, argList);
|
||||
|
||||
TEST_RESULT_VOID(cmdBackup(), "backup");
|
||||
@ -1706,7 +1706,7 @@ testRun(void)
|
||||
hrnCfgArgRaw(argList, cfgOptRepoPath, repoPath);
|
||||
hrnCfgArgRaw(argList, cfgOptPgPath, pg1Path);
|
||||
hrnCfgArgRawZ(argList, cfgOptRepoRetentionFull, "1");
|
||||
strLstAddZ(argList, "--" CFGOPT_TYPE "=" BACKUP_TYPE_FULL);
|
||||
hrnCfgArgRawStrId(argList, cfgOptType, backupTypeFull);
|
||||
strLstAddZ(argList, "--" CFGOPT_STOP_AUTO);
|
||||
strLstAddZ(argList, "--no-" CFGOPT_COMPRESS);
|
||||
strLstAddZ(argList, "--no-" CFGOPT_ARCHIVE_CHECK);
|
||||
@ -1803,7 +1803,7 @@ testRun(void)
|
||||
hrnCfgArgRaw(argList, cfgOptRepoPath, repoPath);
|
||||
hrnCfgArgRaw(argList, cfgOptPgPath, pg1Path);
|
||||
hrnCfgArgRawZ(argList, cfgOptRepoRetentionFull, "1");
|
||||
strLstAddZ(argList, "--" CFGOPT_TYPE "=" BACKUP_TYPE_FULL);
|
||||
hrnCfgArgRawStrId(argList, cfgOptType, backupTypeFull);
|
||||
strLstAddZ(argList, "--" CFGOPT_STOP_AUTO);
|
||||
hrnCfgArgRawBool(argList, cfgOptRepoHardlink, true);
|
||||
strLstAddZ(argList, "--" CFGOPT_ARCHIVE_COPY);
|
||||
@ -1993,7 +1993,7 @@ testRun(void)
|
||||
hrnCfgArgRaw(argList, cfgOptRepoPath, repoPath);
|
||||
hrnCfgArgRaw(argList, cfgOptPgPath, pg1Path);
|
||||
hrnCfgArgRawZ(argList, cfgOptRepoRetentionFull, "1");
|
||||
strLstAddZ(argList, "--" CFGOPT_TYPE "=" BACKUP_TYPE_DIFF);
|
||||
hrnCfgArgRawStrId(argList, cfgOptType, backupTypeDiff);
|
||||
strLstAddZ(argList, "--no-" CFGOPT_COMPRESS);
|
||||
strLstAddZ(argList, "--" CFGOPT_STOP_AUTO);
|
||||
hrnCfgArgRawBool(argList, cfgOptRepoHardlink, true);
|
||||
@ -2322,7 +2322,7 @@ testRun(void)
|
||||
hrnCfgArgRaw(argList, cfgOptRepoPath, repoPath);
|
||||
hrnCfgArgRaw(argList, cfgOptPgPath, pg1Path);
|
||||
hrnCfgArgRawZ(argList, cfgOptRepoRetentionFull, "1");
|
||||
strLstAddZ(argList, "--" CFGOPT_TYPE "=" BACKUP_TYPE_FULL);
|
||||
hrnCfgArgRawStrId(argList, cfgOptType, backupTypeFull);
|
||||
hrnCfgArgRawBool(argList, cfgOptRepoHardlink, true);
|
||||
strLstAddZ(argList, "--" CFGOPT_MANIFEST_SAVE_THRESHOLD "=1");
|
||||
strLstAddZ(argList, "--" CFGOPT_ARCHIVE_COPY);
|
||||
@ -2513,7 +2513,7 @@ testRun(void)
|
||||
hrnCfgArgRaw(argList, cfgOptRepoPath, repoPath);
|
||||
hrnCfgArgRaw(argList, cfgOptPgPath, pg1Path);
|
||||
hrnCfgArgRawZ(argList, cfgOptRepoRetentionFull, "1");
|
||||
strLstAddZ(argList, "--" CFGOPT_TYPE "=" BACKUP_TYPE_INCR);
|
||||
hrnCfgArgRawStrId(argList, cfgOptType, backupTypeIncr);
|
||||
hrnCfgArgRawBool(argList, cfgOptRepoHardlink, true);
|
||||
harnessCfgLoad(cfgCmdBackup, argList);
|
||||
|
||||
@ -2551,7 +2551,7 @@ testRun(void)
|
||||
hrnCfgArgRawZ(argList, cfgOptRepo, "2");
|
||||
hrnCfgArgRaw(argList, cfgOptPgPath, pg1Path);
|
||||
hrnCfgArgRawZ(argList, cfgOptRepoRetentionFull, "1");
|
||||
strLstAddZ(argList, "--" CFGOPT_TYPE "=" BACKUP_TYPE_INCR);
|
||||
hrnCfgArgRawStrId(argList, cfgOptType, backupTypeIncr);
|
||||
strLstAddZ(argList, "--" CFGOPT_DELTA);
|
||||
hrnCfgArgRawBool(argList, cfgOptRepoHardlink, true);
|
||||
harnessCfgLoad(cfgCmdBackup, argList);
|
||||
|
Reference in New Issue
Block a user