mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-03-03 14:52:21 +02:00
Automatically generate constants for command and option names.
These constants are easier than using cfgOptionName() and cfgCommandName() and lead to cleaner code and simpler to construct messages. String versions are provided. Eventually all the strings will be used in the config structures, but for now they are useful to avoid wrapping with strNew().
This commit is contained in:
parent
867690c08d
commit
c5157c0334
@ -32,8 +32,10 @@ use constant BLDLCL_CONSTANT_COMMAND_TOTAL => 'CFG_COMM
|
||||
use constant BLDLCL_CONSTANT_OPTION => '02-constantOption';
|
||||
use constant BLDLCL_CONSTANT_OPTION_TOTAL => 'CFG_OPTION_TOTAL';
|
||||
|
||||
use constant BLDLCL_DATA_COMMAND => '01-command';
|
||||
use constant BLDLCL_DATA_OPTION => '02-option';
|
||||
use constant BLDLCL_DATA_COMMAND_CONSTANT => '01-commandConstant';
|
||||
use constant BLDLCL_DATA_COMMAND => '02-command';
|
||||
use constant BLDLCL_DATA_OPTION_CONSTANT => '03-optionConstant';
|
||||
use constant BLDLCL_DATA_OPTION => '04-option';
|
||||
|
||||
use constant BLDLCL_ENUM_COMMAND => '01-enumCommand';
|
||||
use constant BLDLCL_ENUM_OPTION => '02-enumOption';
|
||||
@ -81,11 +83,21 @@ my $rhBuild =
|
||||
|
||||
&BLD_DATA =>
|
||||
{
|
||||
&BLDLCL_DATA_COMMAND_CONSTANT =>
|
||||
{
|
||||
&BLD_SUMMARY => 'Command constants',
|
||||
},
|
||||
|
||||
&BLDLCL_DATA_COMMAND =>
|
||||
{
|
||||
&BLD_SUMMARY => 'Command data',
|
||||
},
|
||||
|
||||
&BLDLCL_DATA_OPTION_CONSTANT =>
|
||||
{
|
||||
&BLD_SUMMARY => 'Option constants',
|
||||
},
|
||||
|
||||
&BLDLCL_DATA_OPTION =>
|
||||
{
|
||||
&BLD_SUMMARY => 'Option data',
|
||||
@ -119,6 +131,7 @@ sub buildConfig
|
||||
{
|
||||
# Build command constants and data
|
||||
#-------------------------------------------------------------------------------------------------------------------------------
|
||||
my $strCommandConst;
|
||||
my $rhCommandDefine = cfgDefineCommand();
|
||||
my $rhEnum = $rhBuild->{&BLD_FILE}{&BLDLCL_FILE_CONFIG}{&BLD_ENUM}{&BLDLCL_ENUM_COMMAND};
|
||||
my $iCommandTotal = 0;
|
||||
@ -126,11 +139,16 @@ sub buildConfig
|
||||
my $strBuildSource =
|
||||
'static ConfigCommandData configCommandData[' . BLDLCL_CONSTANT_COMMAND_TOTAL . "] = CONFIG_COMMAND_LIST\n" .
|
||||
"(";
|
||||
my $strBuildSourceConstant = '';
|
||||
|
||||
foreach my $strCommand (sort(keys(%{$rhCommandDefine})))
|
||||
{
|
||||
my $rhCommand = $rhCommandDefine->{$strCommand};
|
||||
|
||||
# Build command constant name
|
||||
$strCommandConst = "CFGCMD_" . uc($strCommand);
|
||||
$strCommandConst =~ s/\-/_/g;
|
||||
|
||||
# Build C enum
|
||||
my $strCommandEnum = buildConfigCommandEnum($strCommand);
|
||||
push(@{$rhEnum->{&BLD_LIST}}, $strCommandEnum);
|
||||
@ -140,7 +158,7 @@ sub buildConfig
|
||||
"\n" .
|
||||
" CONFIG_COMMAND\n" .
|
||||
" (\n" .
|
||||
" CONFIG_COMMAND_NAME(\"${strCommand}\")\n" .
|
||||
" CONFIG_COMMAND_NAME(${strCommandConst})\n" .
|
||||
"\n" .
|
||||
" CONFIG_COMMAND_LOG_FILE(" . ($rhCommand->{&CFGDEF_LOG_FILE} ? 'true' : 'false') . ")\n" .
|
||||
" CONFIG_COMMAND_LOG_LEVEL_DEFAULT(logLevel" . ucfirst(lc($rhCommand->{&CFGDEF_LOG_LEVEL_DEFAULT})) . ")\n" .
|
||||
@ -153,6 +171,12 @@ sub buildConfig
|
||||
" CONFIG_COMMAND_PARAMETER_ALLOWED(" . ($rhCommand->{&CFGDEF_PARAMETER_ALLOWED} ? 'true' : 'false') . ")\n" .
|
||||
" )\n";
|
||||
|
||||
$rhBuild->{&BLD_FILE}{&BLDLCL_FILE_CONFIG}{&BLD_CONSTANT_GROUP}{&BLDLCL_CONSTANT_COMMAND}{&BLD_CONSTANT}
|
||||
{$strCommandConst}{&BLD_CONSTANT_VALUE} = "\"${strCommand}\"\n STRING_DECLARE(${strCommandConst}_STR);";
|
||||
|
||||
$strBuildSourceConstant .=
|
||||
"STRING_EXTERN(${strCommandConst}_STR," . (' ' x (49 - length($strCommandConst))) . "${strCommandConst});\n";
|
||||
|
||||
$iCommandTotal++;
|
||||
}
|
||||
|
||||
@ -164,6 +188,11 @@ sub buildConfig
|
||||
")\n";
|
||||
|
||||
$rhBuild->{&BLD_FILE}{&BLDLCL_FILE_CONFIG}{&BLD_DATA}{&BLDLCL_DATA_COMMAND}{&BLD_SOURCE} = $strBuildSource;
|
||||
$rhBuild->{&BLD_FILE}{&BLDLCL_FILE_CONFIG}{&BLD_DATA}{&BLDLCL_DATA_COMMAND_CONSTANT}{&BLD_SOURCE} = $strBuildSourceConstant;
|
||||
|
||||
# Add an LF to the last command constant so there's whitespace before the total
|
||||
$rhBuild->{&BLD_FILE}{&BLDLCL_FILE_CONFIG}{&BLD_CONSTANT_GROUP}{&BLDLCL_CONSTANT_COMMAND}{&BLD_CONSTANT}
|
||||
{$strCommandConst}{&BLD_CONSTANT_VALUE} .= "\n";
|
||||
|
||||
# Set option total constant
|
||||
$rhBuild->{&BLD_FILE}{&BLDLCL_FILE_CONFIG}{&BLD_CONSTANT_GROUP}{&BLDLCL_CONSTANT_COMMAND}{&BLD_CONSTANT}
|
||||
@ -171,6 +200,7 @@ sub buildConfig
|
||||
|
||||
# Build option constants and data
|
||||
#-------------------------------------------------------------------------------------------------------------------------------
|
||||
my $strOptionConst;
|
||||
my $rhConfigDefine = cfgDefine();
|
||||
$rhEnum = $rhBuild->{&BLD_FILE}{&BLDLCL_FILE_CONFIG}{&BLD_ENUM}{&BLDLCL_ENUM_OPTION};
|
||||
my $iOptionTotal = 0;
|
||||
@ -178,6 +208,7 @@ sub buildConfig
|
||||
$strBuildSource =
|
||||
'static ConfigOptionData configOptionData[' . BLDLCL_CONSTANT_OPTION_TOTAL . "] = CONFIG_OPTION_LIST\n" .
|
||||
"(";
|
||||
$strBuildSourceConstant = '';
|
||||
|
||||
foreach my $strOption (sort(keys(%{$rhConfigDefine})))
|
||||
{
|
||||
@ -196,17 +227,28 @@ sub buildConfig
|
||||
my $strOptionIndex = defined($strOptionPrefix) ?
|
||||
"${strOptionPrefix}${iOptionIndex}-" . substr($strOption, length($strOptionPrefix) + 1) : $strOption;
|
||||
|
||||
# Build option constant name
|
||||
$strOptionConst = "CFGOPT_" . uc($strOptionIndex);
|
||||
$strOptionConst =~ s/\-/_/g;
|
||||
|
||||
# Add option data
|
||||
$strBuildSource .=
|
||||
"\n" .
|
||||
" //" . (qw{-} x 126) . "\n" .
|
||||
" CONFIG_OPTION\n" .
|
||||
" (\n" .
|
||||
" CONFIG_OPTION_NAME(\"${strOptionIndex}\")\n" .
|
||||
" CONFIG_OPTION_NAME(${strOptionConst})\n" .
|
||||
" CONFIG_OPTION_INDEX(" . ($iOptionIndex - 1) . ")\n" .
|
||||
" CONFIG_OPTION_DEFINE_ID(" . buildConfigDefineOptionEnum($strOption) . ")\n" .
|
||||
" )\n";
|
||||
|
||||
|
||||
$rhBuild->{&BLD_FILE}{&BLDLCL_FILE_CONFIG}{&BLD_CONSTANT_GROUP}{&BLDLCL_CONSTANT_OPTION}{&BLD_CONSTANT}
|
||||
{$strOptionConst}{&BLD_CONSTANT_VALUE} = "\"${strOptionIndex}\"\n STRING_DECLARE(${strOptionConst}_STR);";
|
||||
|
||||
$strBuildSourceConstant .=
|
||||
"STRING_EXTERN(${strOptionConst}_STR," . (' ' x (49 - length($strOptionConst))) . "${strOptionConst});\n";
|
||||
|
||||
$iOptionTotal += 1;
|
||||
}
|
||||
}
|
||||
@ -215,6 +257,11 @@ sub buildConfig
|
||||
")\n";
|
||||
|
||||
$rhBuild->{&BLD_FILE}{&BLDLCL_FILE_CONFIG}{&BLD_DATA}{&BLDLCL_DATA_OPTION}{&BLD_SOURCE} = $strBuildSource;
|
||||
$rhBuild->{&BLD_FILE}{&BLDLCL_FILE_CONFIG}{&BLD_DATA}{&BLDLCL_DATA_OPTION_CONSTANT}{&BLD_SOURCE} = $strBuildSourceConstant;
|
||||
|
||||
# Add an LF to the last option constant so there's whitespace before the total
|
||||
$rhBuild->{&BLD_FILE}{&BLDLCL_FILE_CONFIG}{&BLD_CONSTANT_GROUP}{&BLDLCL_CONSTANT_OPTION}{&BLD_CONSTANT}
|
||||
{$strOptionConst}{&BLD_CONSTANT_VALUE} .= "\n";
|
||||
|
||||
# Set option total constant
|
||||
$rhBuild->{&BLD_FILE}{&BLDLCL_FILE_CONFIG}{&BLD_CONSTANT_GROUP}{&BLDLCL_CONSTANT_OPTION}{&BLD_CONSTANT}
|
||||
|
@ -109,6 +109,7 @@ sub buildConfigParse
|
||||
|
||||
# Generate output name
|
||||
my $strOptionNameOut = $strOptionName;
|
||||
my $strOptionConst;
|
||||
|
||||
if (defined($strOptionPrefix))
|
||||
{
|
||||
@ -126,7 +127,14 @@ sub buildConfigParse
|
||||
# Generate option value used for parsing (offset is added so options don't conflict with getopt_long return values)
|
||||
my $strOptionFlag = 'PARSE_OPTION_FLAG |';
|
||||
|
||||
if ($iOptionNameIdx > 0)
|
||||
# Build option constant name if this is the current name for the option
|
||||
if ($iOptionNameIdx == 0)
|
||||
{
|
||||
$strOptionConst = "CFGOPT_" . uc($strOptionNameOut);
|
||||
$strOptionConst =~ s/\-/_/g;
|
||||
}
|
||||
# Else use bare string and mark as deprecated
|
||||
else
|
||||
{
|
||||
$strOptionFlag .= ' PARSE_DEPRECATE_FLAG |';
|
||||
}
|
||||
@ -137,7 +145,7 @@ sub buildConfigParse
|
||||
# Add option
|
||||
$strBuildSource .=
|
||||
" {\n" .
|
||||
" .name = \"${strOptionNameOut}\",\n" .
|
||||
" .name = " . (defined($strOptionConst) ? $strOptionConst : "\"${strOptionNameOut}\"") . ",\n" .
|
||||
$strOptionArg .
|
||||
" .val = ${strOptionFlag} ${strOptionVal},\n" .
|
||||
" },\n";
|
||||
@ -148,7 +156,8 @@ sub buildConfigParse
|
||||
{
|
||||
$strBuildSource .=
|
||||
" {\n" .
|
||||
" .name = \"no-${strOptionNameOut}\",\n" .
|
||||
" .name = \"no-" .
|
||||
(defined($strOptionConst) ? "\" ${strOptionConst}" : "${strOptionNameOut}\"") . ",\n" .
|
||||
" .val = ${strOptionFlag} PARSE_NEGATE_FLAG | ${strOptionVal},\n" .
|
||||
" },\n";
|
||||
}
|
||||
@ -159,7 +168,8 @@ sub buildConfigParse
|
||||
{
|
||||
$strBuildSource .=
|
||||
" {\n" .
|
||||
" .name = \"reset-${strOptionNameOut}\",\n" .
|
||||
" .name = \"reset-" .
|
||||
(defined($strOptionConst) ? "\" ${strOptionConst}" : "${strOptionNameOut}\"") . ",\n" .
|
||||
" .val = ${strOptionFlag} PARSE_RESET_FLAG | ${strOptionVal},\n" .
|
||||
" },\n";
|
||||
}
|
||||
|
@ -13,6 +13,13 @@
|
||||
|
||||
<release-list>
|
||||
<release date="XXXX-XX-XX" version="2.13dev" title="UNDER DEVELOPMENT">
|
||||
<release-core-list>
|
||||
<release-development-list>
|
||||
<release-item>
|
||||
<p>Automatically generate constants for command and option names.</p>
|
||||
</release-item>
|
||||
</release-development-list>
|
||||
</release-core-list>
|
||||
</release>
|
||||
|
||||
<release date="2019-04-11" version="2.12" title="C Implementation of Archive Push">
|
||||
|
@ -246,10 +246,10 @@ walPath(const String *walFile, const String *pgPath, const String *command)
|
||||
{
|
||||
THROW_FMT(
|
||||
OptionRequiredError,
|
||||
"option '%s' must be specified when relative wal paths are used\n"
|
||||
"option '" CFGOPT_PG1_PATH "' must be specified when relative wal paths are used\n"
|
||||
"HINT: Is %%f passed to %s instead of %%p?\n"
|
||||
"HINT: PostgreSQL may pass relative paths even with %%p depending on the environment.",
|
||||
cfgOptionName(cfgOptPgPath), strPtr(command));
|
||||
strPtr(command));
|
||||
}
|
||||
|
||||
result = strNewFmt("%s/%s", strPtr(pgPath), strPtr(walFile));
|
||||
|
@ -211,8 +211,8 @@ cmdArchiveGet(void)
|
||||
// The async process should not output on the console at all
|
||||
KeyValue *optionReplace = kvNew();
|
||||
|
||||
kvPut(optionReplace, varNewStr(strNew(cfgOptionName(cfgOptLogLevelConsole))), varNewStrZ("off"));
|
||||
kvPut(optionReplace, varNewStr(strNew(cfgOptionName(cfgOptLogLevelStderr))), varNewStrZ("off"));
|
||||
kvPut(optionReplace, varNewStr(CFGOPT_LOG_LEVEL_CONSOLE_STR), varNewStrZ("off"));
|
||||
kvPut(optionReplace, varNewStr(CFGOPT_LOG_LEVEL_STDERR_STR), varNewStrZ("off"));
|
||||
|
||||
// Generate command options
|
||||
StringList *commandExec = cfgExecParam(cfgCmdArchiveGetAsync, optionReplace);
|
||||
@ -240,9 +240,9 @@ cmdArchiveGet(void)
|
||||
forkDetach();
|
||||
|
||||
// Execute the binary. This statement will not return if it is successful.
|
||||
THROW_ON_SYS_ERROR_FMT(
|
||||
THROW_ON_SYS_ERROR(
|
||||
execvp(strPtr(cfgExe()), (char ** const)strLstPtr(commandExec)) == -1,
|
||||
ExecuteError, "unable to execute '%s'", cfgCommandName(cfgCmdArchiveGetAsync));
|
||||
ExecuteError, "unable to execute '" CFGCMD_ARCHIVE_GET_ASYNC "'");
|
||||
}
|
||||
|
||||
// Mark the async process as forked so it doesn't get forked again. A single run of the async process should be
|
||||
|
@ -295,8 +295,8 @@ cmdArchivePush(void)
|
||||
// The async process should not output on the console at all
|
||||
KeyValue *optionReplace = kvNew();
|
||||
|
||||
kvPut(optionReplace, varNewStr(strNew(cfgOptionName(cfgOptLogLevelConsole))), varNewStrZ("off"));
|
||||
kvPut(optionReplace, varNewStr(strNew(cfgOptionName(cfgOptLogLevelStderr))), varNewStrZ("off"));
|
||||
kvPut(optionReplace, varNewStr(CFGOPT_LOG_LEVEL_CONSOLE_STR), varNewStrZ("off"));
|
||||
kvPut(optionReplace, varNewStr(CFGOPT_LOG_LEVEL_STDERR_STR), varNewStrZ("off"));
|
||||
|
||||
// Generate command options
|
||||
StringList *commandExec = cfgExecParam(cfgCmdArchivePushAsync, optionReplace);
|
||||
@ -316,9 +316,9 @@ cmdArchivePush(void)
|
||||
forkDetach();
|
||||
|
||||
// Execute the binary. This statement will not return if it is successful.
|
||||
THROW_ON_SYS_ERROR_FMT(
|
||||
THROW_ON_SYS_ERROR(
|
||||
execvp(strPtr(cfgExe()), (char ** const)strLstPtr(commandExec)) == -1,
|
||||
ExecuteError, "unable to execute '%s'", cfgCommandName(cfgCmdArchiveGetAsync));
|
||||
ExecuteError, "unable to execute '" CFGCMD_ARCHIVE_PUSH_ASYNC "'");
|
||||
}
|
||||
|
||||
// Mark the async process as forked so it doesn't get forked again. A single run of the async process should be
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -9,11 +9,375 @@ Automatically generated by Build.pm -- do not modify directly.
|
||||
/***********************************************************************************************************************************
|
||||
Command constants
|
||||
***********************************************************************************************************************************/
|
||||
#define CFGCMD_ARCHIVE_GET "archive-get"
|
||||
STRING_DECLARE(CFGCMD_ARCHIVE_GET_STR);
|
||||
#define CFGCMD_ARCHIVE_GET_ASYNC "archive-get-async"
|
||||
STRING_DECLARE(CFGCMD_ARCHIVE_GET_ASYNC_STR);
|
||||
#define CFGCMD_ARCHIVE_PUSH "archive-push"
|
||||
STRING_DECLARE(CFGCMD_ARCHIVE_PUSH_STR);
|
||||
#define CFGCMD_ARCHIVE_PUSH_ASYNC "archive-push-async"
|
||||
STRING_DECLARE(CFGCMD_ARCHIVE_PUSH_ASYNC_STR);
|
||||
#define CFGCMD_BACKUP "backup"
|
||||
STRING_DECLARE(CFGCMD_BACKUP_STR);
|
||||
#define CFGCMD_CHECK "check"
|
||||
STRING_DECLARE(CFGCMD_CHECK_STR);
|
||||
#define CFGCMD_EXPIRE "expire"
|
||||
STRING_DECLARE(CFGCMD_EXPIRE_STR);
|
||||
#define CFGCMD_HELP "help"
|
||||
STRING_DECLARE(CFGCMD_HELP_STR);
|
||||
#define CFGCMD_INFO "info"
|
||||
STRING_DECLARE(CFGCMD_INFO_STR);
|
||||
#define CFGCMD_LOCAL "local"
|
||||
STRING_DECLARE(CFGCMD_LOCAL_STR);
|
||||
#define CFGCMD_REMOTE "remote"
|
||||
STRING_DECLARE(CFGCMD_REMOTE_STR);
|
||||
#define CFGCMD_RESTORE "restore"
|
||||
STRING_DECLARE(CFGCMD_RESTORE_STR);
|
||||
#define CFGCMD_STANZA_CREATE "stanza-create"
|
||||
STRING_DECLARE(CFGCMD_STANZA_CREATE_STR);
|
||||
#define CFGCMD_STANZA_DELETE "stanza-delete"
|
||||
STRING_DECLARE(CFGCMD_STANZA_DELETE_STR);
|
||||
#define CFGCMD_STANZA_UPGRADE "stanza-upgrade"
|
||||
STRING_DECLARE(CFGCMD_STANZA_UPGRADE_STR);
|
||||
#define CFGCMD_START "start"
|
||||
STRING_DECLARE(CFGCMD_START_STR);
|
||||
#define CFGCMD_STOP "stop"
|
||||
STRING_DECLARE(CFGCMD_STOP_STR);
|
||||
#define CFGCMD_VERSION "version"
|
||||
STRING_DECLARE(CFGCMD_VERSION_STR);
|
||||
|
||||
#define CFG_COMMAND_TOTAL 19
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Option constants
|
||||
***********************************************************************************************************************************/
|
||||
#define CFGOPT_ARCHIVE_ASYNC "archive-async"
|
||||
STRING_DECLARE(CFGOPT_ARCHIVE_ASYNC_STR);
|
||||
#define CFGOPT_ARCHIVE_CHECK "archive-check"
|
||||
STRING_DECLARE(CFGOPT_ARCHIVE_CHECK_STR);
|
||||
#define CFGOPT_ARCHIVE_COPY "archive-copy"
|
||||
STRING_DECLARE(CFGOPT_ARCHIVE_COPY_STR);
|
||||
#define CFGOPT_ARCHIVE_GET_QUEUE_MAX "archive-get-queue-max"
|
||||
STRING_DECLARE(CFGOPT_ARCHIVE_GET_QUEUE_MAX_STR);
|
||||
#define CFGOPT_ARCHIVE_PUSH_QUEUE_MAX "archive-push-queue-max"
|
||||
STRING_DECLARE(CFGOPT_ARCHIVE_PUSH_QUEUE_MAX_STR);
|
||||
#define CFGOPT_ARCHIVE_TIMEOUT "archive-timeout"
|
||||
STRING_DECLARE(CFGOPT_ARCHIVE_TIMEOUT_STR);
|
||||
#define CFGOPT_BACKUP_STANDBY "backup-standby"
|
||||
STRING_DECLARE(CFGOPT_BACKUP_STANDBY_STR);
|
||||
#define CFGOPT_BUFFER_SIZE "buffer-size"
|
||||
STRING_DECLARE(CFGOPT_BUFFER_SIZE_STR);
|
||||
#define CFGOPT_CHECKSUM_PAGE "checksum-page"
|
||||
STRING_DECLARE(CFGOPT_CHECKSUM_PAGE_STR);
|
||||
#define CFGOPT_CMD_SSH "cmd-ssh"
|
||||
STRING_DECLARE(CFGOPT_CMD_SSH_STR);
|
||||
#define CFGOPT_COMMAND "command"
|
||||
STRING_DECLARE(CFGOPT_COMMAND_STR);
|
||||
#define CFGOPT_COMPRESS "compress"
|
||||
STRING_DECLARE(CFGOPT_COMPRESS_STR);
|
||||
#define CFGOPT_COMPRESS_LEVEL "compress-level"
|
||||
STRING_DECLARE(CFGOPT_COMPRESS_LEVEL_STR);
|
||||
#define CFGOPT_COMPRESS_LEVEL_NETWORK "compress-level-network"
|
||||
STRING_DECLARE(CFGOPT_COMPRESS_LEVEL_NETWORK_STR);
|
||||
#define CFGOPT_CONFIG "config"
|
||||
STRING_DECLARE(CFGOPT_CONFIG_STR);
|
||||
#define CFGOPT_CONFIG_INCLUDE_PATH "config-include-path"
|
||||
STRING_DECLARE(CFGOPT_CONFIG_INCLUDE_PATH_STR);
|
||||
#define CFGOPT_CONFIG_PATH "config-path"
|
||||
STRING_DECLARE(CFGOPT_CONFIG_PATH_STR);
|
||||
#define CFGOPT_DB_INCLUDE "db-include"
|
||||
STRING_DECLARE(CFGOPT_DB_INCLUDE_STR);
|
||||
#define CFGOPT_DB_TIMEOUT "db-timeout"
|
||||
STRING_DECLARE(CFGOPT_DB_TIMEOUT_STR);
|
||||
#define CFGOPT_DELTA "delta"
|
||||
STRING_DECLARE(CFGOPT_DELTA_STR);
|
||||
#define CFGOPT_EXCLUDE "exclude"
|
||||
STRING_DECLARE(CFGOPT_EXCLUDE_STR);
|
||||
#define CFGOPT_FORCE "force"
|
||||
STRING_DECLARE(CFGOPT_FORCE_STR);
|
||||
#define CFGOPT_HOST_ID "host-id"
|
||||
STRING_DECLARE(CFGOPT_HOST_ID_STR);
|
||||
#define CFGOPT_LINK_ALL "link-all"
|
||||
STRING_DECLARE(CFGOPT_LINK_ALL_STR);
|
||||
#define CFGOPT_LINK_MAP "link-map"
|
||||
STRING_DECLARE(CFGOPT_LINK_MAP_STR);
|
||||
#define CFGOPT_LOCK_PATH "lock-path"
|
||||
STRING_DECLARE(CFGOPT_LOCK_PATH_STR);
|
||||
#define CFGOPT_LOG_LEVEL_CONSOLE "log-level-console"
|
||||
STRING_DECLARE(CFGOPT_LOG_LEVEL_CONSOLE_STR);
|
||||
#define CFGOPT_LOG_LEVEL_FILE "log-level-file"
|
||||
STRING_DECLARE(CFGOPT_LOG_LEVEL_FILE_STR);
|
||||
#define CFGOPT_LOG_LEVEL_STDERR "log-level-stderr"
|
||||
STRING_DECLARE(CFGOPT_LOG_LEVEL_STDERR_STR);
|
||||
#define CFGOPT_LOG_PATH "log-path"
|
||||
STRING_DECLARE(CFGOPT_LOG_PATH_STR);
|
||||
#define CFGOPT_LOG_SUBPROCESS "log-subprocess"
|
||||
STRING_DECLARE(CFGOPT_LOG_SUBPROCESS_STR);
|
||||
#define CFGOPT_LOG_TIMESTAMP "log-timestamp"
|
||||
STRING_DECLARE(CFGOPT_LOG_TIMESTAMP_STR);
|
||||
#define CFGOPT_MANIFEST_SAVE_THRESHOLD "manifest-save-threshold"
|
||||
STRING_DECLARE(CFGOPT_MANIFEST_SAVE_THRESHOLD_STR);
|
||||
#define CFGOPT_NEUTRAL_UMASK "neutral-umask"
|
||||
STRING_DECLARE(CFGOPT_NEUTRAL_UMASK_STR);
|
||||
#define CFGOPT_ONLINE "online"
|
||||
STRING_DECLARE(CFGOPT_ONLINE_STR);
|
||||
#define CFGOPT_OUTPUT "output"
|
||||
STRING_DECLARE(CFGOPT_OUTPUT_STR);
|
||||
#define CFGOPT_PERL_OPTION "perl-option"
|
||||
STRING_DECLARE(CFGOPT_PERL_OPTION_STR);
|
||||
#define CFGOPT_PG1_HOST "pg1-host"
|
||||
STRING_DECLARE(CFGOPT_PG1_HOST_STR);
|
||||
#define CFGOPT_PG1_HOST_CMD "pg1-host-cmd"
|
||||
STRING_DECLARE(CFGOPT_PG1_HOST_CMD_STR);
|
||||
#define CFGOPT_PG1_HOST_CONFIG "pg1-host-config"
|
||||
STRING_DECLARE(CFGOPT_PG1_HOST_CONFIG_STR);
|
||||
#define CFGOPT_PG1_HOST_CONFIG_INCLUDE_PATH "pg1-host-config-include-path"
|
||||
STRING_DECLARE(CFGOPT_PG1_HOST_CONFIG_INCLUDE_PATH_STR);
|
||||
#define CFGOPT_PG1_HOST_CONFIG_PATH "pg1-host-config-path"
|
||||
STRING_DECLARE(CFGOPT_PG1_HOST_CONFIG_PATH_STR);
|
||||
#define CFGOPT_PG1_HOST_PORT "pg1-host-port"
|
||||
STRING_DECLARE(CFGOPT_PG1_HOST_PORT_STR);
|
||||
#define CFGOPT_PG1_HOST_USER "pg1-host-user"
|
||||
STRING_DECLARE(CFGOPT_PG1_HOST_USER_STR);
|
||||
#define CFGOPT_PG1_PATH "pg1-path"
|
||||
STRING_DECLARE(CFGOPT_PG1_PATH_STR);
|
||||
#define CFGOPT_PG1_PORT "pg1-port"
|
||||
STRING_DECLARE(CFGOPT_PG1_PORT_STR);
|
||||
#define CFGOPT_PG1_SOCKET_PATH "pg1-socket-path"
|
||||
STRING_DECLARE(CFGOPT_PG1_SOCKET_PATH_STR);
|
||||
#define CFGOPT_PG2_HOST "pg2-host"
|
||||
STRING_DECLARE(CFGOPT_PG2_HOST_STR);
|
||||
#define CFGOPT_PG2_HOST_CMD "pg2-host-cmd"
|
||||
STRING_DECLARE(CFGOPT_PG2_HOST_CMD_STR);
|
||||
#define CFGOPT_PG2_HOST_CONFIG "pg2-host-config"
|
||||
STRING_DECLARE(CFGOPT_PG2_HOST_CONFIG_STR);
|
||||
#define CFGOPT_PG2_HOST_CONFIG_INCLUDE_PATH "pg2-host-config-include-path"
|
||||
STRING_DECLARE(CFGOPT_PG2_HOST_CONFIG_INCLUDE_PATH_STR);
|
||||
#define CFGOPT_PG2_HOST_CONFIG_PATH "pg2-host-config-path"
|
||||
STRING_DECLARE(CFGOPT_PG2_HOST_CONFIG_PATH_STR);
|
||||
#define CFGOPT_PG2_HOST_PORT "pg2-host-port"
|
||||
STRING_DECLARE(CFGOPT_PG2_HOST_PORT_STR);
|
||||
#define CFGOPT_PG2_HOST_USER "pg2-host-user"
|
||||
STRING_DECLARE(CFGOPT_PG2_HOST_USER_STR);
|
||||
#define CFGOPT_PG2_PATH "pg2-path"
|
||||
STRING_DECLARE(CFGOPT_PG2_PATH_STR);
|
||||
#define CFGOPT_PG2_PORT "pg2-port"
|
||||
STRING_DECLARE(CFGOPT_PG2_PORT_STR);
|
||||
#define CFGOPT_PG2_SOCKET_PATH "pg2-socket-path"
|
||||
STRING_DECLARE(CFGOPT_PG2_SOCKET_PATH_STR);
|
||||
#define CFGOPT_PG3_HOST "pg3-host"
|
||||
STRING_DECLARE(CFGOPT_PG3_HOST_STR);
|
||||
#define CFGOPT_PG3_HOST_CMD "pg3-host-cmd"
|
||||
STRING_DECLARE(CFGOPT_PG3_HOST_CMD_STR);
|
||||
#define CFGOPT_PG3_HOST_CONFIG "pg3-host-config"
|
||||
STRING_DECLARE(CFGOPT_PG3_HOST_CONFIG_STR);
|
||||
#define CFGOPT_PG3_HOST_CONFIG_INCLUDE_PATH "pg3-host-config-include-path"
|
||||
STRING_DECLARE(CFGOPT_PG3_HOST_CONFIG_INCLUDE_PATH_STR);
|
||||
#define CFGOPT_PG3_HOST_CONFIG_PATH "pg3-host-config-path"
|
||||
STRING_DECLARE(CFGOPT_PG3_HOST_CONFIG_PATH_STR);
|
||||
#define CFGOPT_PG3_HOST_PORT "pg3-host-port"
|
||||
STRING_DECLARE(CFGOPT_PG3_HOST_PORT_STR);
|
||||
#define CFGOPT_PG3_HOST_USER "pg3-host-user"
|
||||
STRING_DECLARE(CFGOPT_PG3_HOST_USER_STR);
|
||||
#define CFGOPT_PG3_PATH "pg3-path"
|
||||
STRING_DECLARE(CFGOPT_PG3_PATH_STR);
|
||||
#define CFGOPT_PG3_PORT "pg3-port"
|
||||
STRING_DECLARE(CFGOPT_PG3_PORT_STR);
|
||||
#define CFGOPT_PG3_SOCKET_PATH "pg3-socket-path"
|
||||
STRING_DECLARE(CFGOPT_PG3_SOCKET_PATH_STR);
|
||||
#define CFGOPT_PG4_HOST "pg4-host"
|
||||
STRING_DECLARE(CFGOPT_PG4_HOST_STR);
|
||||
#define CFGOPT_PG4_HOST_CMD "pg4-host-cmd"
|
||||
STRING_DECLARE(CFGOPT_PG4_HOST_CMD_STR);
|
||||
#define CFGOPT_PG4_HOST_CONFIG "pg4-host-config"
|
||||
STRING_DECLARE(CFGOPT_PG4_HOST_CONFIG_STR);
|
||||
#define CFGOPT_PG4_HOST_CONFIG_INCLUDE_PATH "pg4-host-config-include-path"
|
||||
STRING_DECLARE(CFGOPT_PG4_HOST_CONFIG_INCLUDE_PATH_STR);
|
||||
#define CFGOPT_PG4_HOST_CONFIG_PATH "pg4-host-config-path"
|
||||
STRING_DECLARE(CFGOPT_PG4_HOST_CONFIG_PATH_STR);
|
||||
#define CFGOPT_PG4_HOST_PORT "pg4-host-port"
|
||||
STRING_DECLARE(CFGOPT_PG4_HOST_PORT_STR);
|
||||
#define CFGOPT_PG4_HOST_USER "pg4-host-user"
|
||||
STRING_DECLARE(CFGOPT_PG4_HOST_USER_STR);
|
||||
#define CFGOPT_PG4_PATH "pg4-path"
|
||||
STRING_DECLARE(CFGOPT_PG4_PATH_STR);
|
||||
#define CFGOPT_PG4_PORT "pg4-port"
|
||||
STRING_DECLARE(CFGOPT_PG4_PORT_STR);
|
||||
#define CFGOPT_PG4_SOCKET_PATH "pg4-socket-path"
|
||||
STRING_DECLARE(CFGOPT_PG4_SOCKET_PATH_STR);
|
||||
#define CFGOPT_PG5_HOST "pg5-host"
|
||||
STRING_DECLARE(CFGOPT_PG5_HOST_STR);
|
||||
#define CFGOPT_PG5_HOST_CMD "pg5-host-cmd"
|
||||
STRING_DECLARE(CFGOPT_PG5_HOST_CMD_STR);
|
||||
#define CFGOPT_PG5_HOST_CONFIG "pg5-host-config"
|
||||
STRING_DECLARE(CFGOPT_PG5_HOST_CONFIG_STR);
|
||||
#define CFGOPT_PG5_HOST_CONFIG_INCLUDE_PATH "pg5-host-config-include-path"
|
||||
STRING_DECLARE(CFGOPT_PG5_HOST_CONFIG_INCLUDE_PATH_STR);
|
||||
#define CFGOPT_PG5_HOST_CONFIG_PATH "pg5-host-config-path"
|
||||
STRING_DECLARE(CFGOPT_PG5_HOST_CONFIG_PATH_STR);
|
||||
#define CFGOPT_PG5_HOST_PORT "pg5-host-port"
|
||||
STRING_DECLARE(CFGOPT_PG5_HOST_PORT_STR);
|
||||
#define CFGOPT_PG5_HOST_USER "pg5-host-user"
|
||||
STRING_DECLARE(CFGOPT_PG5_HOST_USER_STR);
|
||||
#define CFGOPT_PG5_PATH "pg5-path"
|
||||
STRING_DECLARE(CFGOPT_PG5_PATH_STR);
|
||||
#define CFGOPT_PG5_PORT "pg5-port"
|
||||
STRING_DECLARE(CFGOPT_PG5_PORT_STR);
|
||||
#define CFGOPT_PG5_SOCKET_PATH "pg5-socket-path"
|
||||
STRING_DECLARE(CFGOPT_PG5_SOCKET_PATH_STR);
|
||||
#define CFGOPT_PG6_HOST "pg6-host"
|
||||
STRING_DECLARE(CFGOPT_PG6_HOST_STR);
|
||||
#define CFGOPT_PG6_HOST_CMD "pg6-host-cmd"
|
||||
STRING_DECLARE(CFGOPT_PG6_HOST_CMD_STR);
|
||||
#define CFGOPT_PG6_HOST_CONFIG "pg6-host-config"
|
||||
STRING_DECLARE(CFGOPT_PG6_HOST_CONFIG_STR);
|
||||
#define CFGOPT_PG6_HOST_CONFIG_INCLUDE_PATH "pg6-host-config-include-path"
|
||||
STRING_DECLARE(CFGOPT_PG6_HOST_CONFIG_INCLUDE_PATH_STR);
|
||||
#define CFGOPT_PG6_HOST_CONFIG_PATH "pg6-host-config-path"
|
||||
STRING_DECLARE(CFGOPT_PG6_HOST_CONFIG_PATH_STR);
|
||||
#define CFGOPT_PG6_HOST_PORT "pg6-host-port"
|
||||
STRING_DECLARE(CFGOPT_PG6_HOST_PORT_STR);
|
||||
#define CFGOPT_PG6_HOST_USER "pg6-host-user"
|
||||
STRING_DECLARE(CFGOPT_PG6_HOST_USER_STR);
|
||||
#define CFGOPT_PG6_PATH "pg6-path"
|
||||
STRING_DECLARE(CFGOPT_PG6_PATH_STR);
|
||||
#define CFGOPT_PG6_PORT "pg6-port"
|
||||
STRING_DECLARE(CFGOPT_PG6_PORT_STR);
|
||||
#define CFGOPT_PG6_SOCKET_PATH "pg6-socket-path"
|
||||
STRING_DECLARE(CFGOPT_PG6_SOCKET_PATH_STR);
|
||||
#define CFGOPT_PG7_HOST "pg7-host"
|
||||
STRING_DECLARE(CFGOPT_PG7_HOST_STR);
|
||||
#define CFGOPT_PG7_HOST_CMD "pg7-host-cmd"
|
||||
STRING_DECLARE(CFGOPT_PG7_HOST_CMD_STR);
|
||||
#define CFGOPT_PG7_HOST_CONFIG "pg7-host-config"
|
||||
STRING_DECLARE(CFGOPT_PG7_HOST_CONFIG_STR);
|
||||
#define CFGOPT_PG7_HOST_CONFIG_INCLUDE_PATH "pg7-host-config-include-path"
|
||||
STRING_DECLARE(CFGOPT_PG7_HOST_CONFIG_INCLUDE_PATH_STR);
|
||||
#define CFGOPT_PG7_HOST_CONFIG_PATH "pg7-host-config-path"
|
||||
STRING_DECLARE(CFGOPT_PG7_HOST_CONFIG_PATH_STR);
|
||||
#define CFGOPT_PG7_HOST_PORT "pg7-host-port"
|
||||
STRING_DECLARE(CFGOPT_PG7_HOST_PORT_STR);
|
||||
#define CFGOPT_PG7_HOST_USER "pg7-host-user"
|
||||
STRING_DECLARE(CFGOPT_PG7_HOST_USER_STR);
|
||||
#define CFGOPT_PG7_PATH "pg7-path"
|
||||
STRING_DECLARE(CFGOPT_PG7_PATH_STR);
|
||||
#define CFGOPT_PG7_PORT "pg7-port"
|
||||
STRING_DECLARE(CFGOPT_PG7_PORT_STR);
|
||||
#define CFGOPT_PG7_SOCKET_PATH "pg7-socket-path"
|
||||
STRING_DECLARE(CFGOPT_PG7_SOCKET_PATH_STR);
|
||||
#define CFGOPT_PG8_HOST "pg8-host"
|
||||
STRING_DECLARE(CFGOPT_PG8_HOST_STR);
|
||||
#define CFGOPT_PG8_HOST_CMD "pg8-host-cmd"
|
||||
STRING_DECLARE(CFGOPT_PG8_HOST_CMD_STR);
|
||||
#define CFGOPT_PG8_HOST_CONFIG "pg8-host-config"
|
||||
STRING_DECLARE(CFGOPT_PG8_HOST_CONFIG_STR);
|
||||
#define CFGOPT_PG8_HOST_CONFIG_INCLUDE_PATH "pg8-host-config-include-path"
|
||||
STRING_DECLARE(CFGOPT_PG8_HOST_CONFIG_INCLUDE_PATH_STR);
|
||||
#define CFGOPT_PG8_HOST_CONFIG_PATH "pg8-host-config-path"
|
||||
STRING_DECLARE(CFGOPT_PG8_HOST_CONFIG_PATH_STR);
|
||||
#define CFGOPT_PG8_HOST_PORT "pg8-host-port"
|
||||
STRING_DECLARE(CFGOPT_PG8_HOST_PORT_STR);
|
||||
#define CFGOPT_PG8_HOST_USER "pg8-host-user"
|
||||
STRING_DECLARE(CFGOPT_PG8_HOST_USER_STR);
|
||||
#define CFGOPT_PG8_PATH "pg8-path"
|
||||
STRING_DECLARE(CFGOPT_PG8_PATH_STR);
|
||||
#define CFGOPT_PG8_PORT "pg8-port"
|
||||
STRING_DECLARE(CFGOPT_PG8_PORT_STR);
|
||||
#define CFGOPT_PG8_SOCKET_PATH "pg8-socket-path"
|
||||
STRING_DECLARE(CFGOPT_PG8_SOCKET_PATH_STR);
|
||||
#define CFGOPT_PROCESS "process"
|
||||
STRING_DECLARE(CFGOPT_PROCESS_STR);
|
||||
#define CFGOPT_PROCESS_MAX "process-max"
|
||||
STRING_DECLARE(CFGOPT_PROCESS_MAX_STR);
|
||||
#define CFGOPT_PROTOCOL_TIMEOUT "protocol-timeout"
|
||||
STRING_DECLARE(CFGOPT_PROTOCOL_TIMEOUT_STR);
|
||||
#define CFGOPT_RECOVERY_OPTION "recovery-option"
|
||||
STRING_DECLARE(CFGOPT_RECOVERY_OPTION_STR);
|
||||
#define CFGOPT_REPO1_CIPHER_PASS "repo1-cipher-pass"
|
||||
STRING_DECLARE(CFGOPT_REPO1_CIPHER_PASS_STR);
|
||||
#define CFGOPT_REPO1_CIPHER_TYPE "repo1-cipher-type"
|
||||
STRING_DECLARE(CFGOPT_REPO1_CIPHER_TYPE_STR);
|
||||
#define CFGOPT_REPO1_HARDLINK "repo1-hardlink"
|
||||
STRING_DECLARE(CFGOPT_REPO1_HARDLINK_STR);
|
||||
#define CFGOPT_REPO1_HOST "repo1-host"
|
||||
STRING_DECLARE(CFGOPT_REPO1_HOST_STR);
|
||||
#define CFGOPT_REPO1_HOST_CMD "repo1-host-cmd"
|
||||
STRING_DECLARE(CFGOPT_REPO1_HOST_CMD_STR);
|
||||
#define CFGOPT_REPO1_HOST_CONFIG "repo1-host-config"
|
||||
STRING_DECLARE(CFGOPT_REPO1_HOST_CONFIG_STR);
|
||||
#define CFGOPT_REPO1_HOST_CONFIG_INCLUDE_PATH "repo1-host-config-include-path"
|
||||
STRING_DECLARE(CFGOPT_REPO1_HOST_CONFIG_INCLUDE_PATH_STR);
|
||||
#define CFGOPT_REPO1_HOST_CONFIG_PATH "repo1-host-config-path"
|
||||
STRING_DECLARE(CFGOPT_REPO1_HOST_CONFIG_PATH_STR);
|
||||
#define CFGOPT_REPO1_HOST_PORT "repo1-host-port"
|
||||
STRING_DECLARE(CFGOPT_REPO1_HOST_PORT_STR);
|
||||
#define CFGOPT_REPO1_HOST_USER "repo1-host-user"
|
||||
STRING_DECLARE(CFGOPT_REPO1_HOST_USER_STR);
|
||||
#define CFGOPT_REPO1_PATH "repo1-path"
|
||||
STRING_DECLARE(CFGOPT_REPO1_PATH_STR);
|
||||
#define CFGOPT_REPO1_RETENTION_ARCHIVE "repo1-retention-archive"
|
||||
STRING_DECLARE(CFGOPT_REPO1_RETENTION_ARCHIVE_STR);
|
||||
#define CFGOPT_REPO1_RETENTION_ARCHIVE_TYPE "repo1-retention-archive-type"
|
||||
STRING_DECLARE(CFGOPT_REPO1_RETENTION_ARCHIVE_TYPE_STR);
|
||||
#define CFGOPT_REPO1_RETENTION_DIFF "repo1-retention-diff"
|
||||
STRING_DECLARE(CFGOPT_REPO1_RETENTION_DIFF_STR);
|
||||
#define CFGOPT_REPO1_RETENTION_FULL "repo1-retention-full"
|
||||
STRING_DECLARE(CFGOPT_REPO1_RETENTION_FULL_STR);
|
||||
#define CFGOPT_REPO1_S3_BUCKET "repo1-s3-bucket"
|
||||
STRING_DECLARE(CFGOPT_REPO1_S3_BUCKET_STR);
|
||||
#define CFGOPT_REPO1_S3_CA_FILE "repo1-s3-ca-file"
|
||||
STRING_DECLARE(CFGOPT_REPO1_S3_CA_FILE_STR);
|
||||
#define CFGOPT_REPO1_S3_CA_PATH "repo1-s3-ca-path"
|
||||
STRING_DECLARE(CFGOPT_REPO1_S3_CA_PATH_STR);
|
||||
#define CFGOPT_REPO1_S3_ENDPOINT "repo1-s3-endpoint"
|
||||
STRING_DECLARE(CFGOPT_REPO1_S3_ENDPOINT_STR);
|
||||
#define CFGOPT_REPO1_S3_HOST "repo1-s3-host"
|
||||
STRING_DECLARE(CFGOPT_REPO1_S3_HOST_STR);
|
||||
#define CFGOPT_REPO1_S3_KEY "repo1-s3-key"
|
||||
STRING_DECLARE(CFGOPT_REPO1_S3_KEY_STR);
|
||||
#define CFGOPT_REPO1_S3_KEY_SECRET "repo1-s3-key-secret"
|
||||
STRING_DECLARE(CFGOPT_REPO1_S3_KEY_SECRET_STR);
|
||||
#define CFGOPT_REPO1_S3_REGION "repo1-s3-region"
|
||||
STRING_DECLARE(CFGOPT_REPO1_S3_REGION_STR);
|
||||
#define CFGOPT_REPO1_S3_TOKEN "repo1-s3-token"
|
||||
STRING_DECLARE(CFGOPT_REPO1_S3_TOKEN_STR);
|
||||
#define CFGOPT_REPO1_S3_VERIFY_SSL "repo1-s3-verify-ssl"
|
||||
STRING_DECLARE(CFGOPT_REPO1_S3_VERIFY_SSL_STR);
|
||||
#define CFGOPT_REPO1_TYPE "repo1-type"
|
||||
STRING_DECLARE(CFGOPT_REPO1_TYPE_STR);
|
||||
#define CFGOPT_RESUME "resume"
|
||||
STRING_DECLARE(CFGOPT_RESUME_STR);
|
||||
#define CFGOPT_SET "set"
|
||||
STRING_DECLARE(CFGOPT_SET_STR);
|
||||
#define CFGOPT_SPOOL_PATH "spool-path"
|
||||
STRING_DECLARE(CFGOPT_SPOOL_PATH_STR);
|
||||
#define CFGOPT_STANZA "stanza"
|
||||
STRING_DECLARE(CFGOPT_STANZA_STR);
|
||||
#define CFGOPT_START_FAST "start-fast"
|
||||
STRING_DECLARE(CFGOPT_START_FAST_STR);
|
||||
#define CFGOPT_STOP_AUTO "stop-auto"
|
||||
STRING_DECLARE(CFGOPT_STOP_AUTO_STR);
|
||||
#define CFGOPT_TABLESPACE_MAP "tablespace-map"
|
||||
STRING_DECLARE(CFGOPT_TABLESPACE_MAP_STR);
|
||||
#define CFGOPT_TABLESPACE_MAP_ALL "tablespace-map-all"
|
||||
STRING_DECLARE(CFGOPT_TABLESPACE_MAP_ALL_STR);
|
||||
#define CFGOPT_TARGET "target"
|
||||
STRING_DECLARE(CFGOPT_TARGET_STR);
|
||||
#define CFGOPT_TARGET_ACTION "target-action"
|
||||
STRING_DECLARE(CFGOPT_TARGET_ACTION_STR);
|
||||
#define CFGOPT_TARGET_EXCLUSIVE "target-exclusive"
|
||||
STRING_DECLARE(CFGOPT_TARGET_EXCLUSIVE_STR);
|
||||
#define CFGOPT_TARGET_TIMELINE "target-timeline"
|
||||
STRING_DECLARE(CFGOPT_TARGET_TIMELINE_STR);
|
||||
#define CFGOPT_TEST "test"
|
||||
STRING_DECLARE(CFGOPT_TEST_STR);
|
||||
#define CFGOPT_TEST_DELAY "test-delay"
|
||||
STRING_DECLARE(CFGOPT_TEST_DELAY_STR);
|
||||
#define CFGOPT_TEST_POINT "test-point"
|
||||
STRING_DECLARE(CFGOPT_TEST_POINT_STR);
|
||||
#define CFGOPT_TYPE "type"
|
||||
STRING_DECLARE(CFGOPT_TYPE_STR);
|
||||
|
||||
#define CFG_OPTION_TOTAL 163
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
|
@ -99,11 +99,12 @@ cfgLoadUpdateOption(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
THROW_FMT(OptionInvalidValueError,
|
||||
"'%s' is not valid for '%s' option\nHINT '%s' option (%s) should be greater than '%s' option (%s).",
|
||||
strPtr(varStrForce(cfgOption(cfgOptProtocolTimeout))), cfgOptionName(cfgOptProtocolTimeout),
|
||||
cfgOptionName(cfgOptProtocolTimeout), strPtr(varStrForce(cfgOption(cfgOptProtocolTimeout))),
|
||||
cfgOptionName(cfgOptDbTimeout), strPtr(varStrForce(cfgOption(cfgOptDbTimeout))));
|
||||
THROW_FMT(
|
||||
OptionInvalidValueError,
|
||||
"'%s' is not valid for '" CFGOPT_PROTOCOL_TIMEOUT "' option\nHINT '" CFGOPT_PROTOCOL_TIMEOUT "' option (%s)"
|
||||
" should be greater than '" CFGOPT_DB_TIMEOUT "' option (%s).",
|
||||
strPtr(varStrForce(cfgOption(cfgOptProtocolTimeout))), strPtr(varStrForce(cfgOption(cfgOptProtocolTimeout))),
|
||||
strPtr(varStrForce(cfgOption(cfgOptDbTimeout))));
|
||||
}
|
||||
}
|
||||
|
||||
@ -140,8 +141,9 @@ cfgLoadUpdateOption(void)
|
||||
// If the repo-type is defined, then see if corresponding retention-full is set
|
||||
if (cfgOptionTest(cfgOptRepoType + optionIdx) && !cfgOptionTest(cfgOptRepoRetentionFull + optionIdx))
|
||||
{
|
||||
LOG_WARN("option %s is not set, the repository may run out of space\n"
|
||||
"HINT: to retain full backups indefinitely (without warning), set option '%s' to the maximum.",
|
||||
LOG_WARN(
|
||||
"option %s is not set, the repository may run out of space"
|
||||
"\nHINT: to retain full backups indefinitely (without warning), set option '%s' to the maximum.",
|
||||
cfgOptionName(cfgOptRepoRetentionFull + optionIdx),
|
||||
cfgOptionName(cfgOptRepoRetentionFull + optionIdx));
|
||||
}
|
||||
@ -156,8 +158,9 @@ cfgLoadUpdateOption(void)
|
||||
{
|
||||
const String *archiveRetentionType = cfgOptionStr(cfgOptRepoRetentionArchiveType + optionIdx);
|
||||
|
||||
const String *msgArchiveOff = strNewFmt("WAL segments will not be expired: option '%s=%s' but",
|
||||
cfgOptionName(cfgOptRepoRetentionArchiveType), strPtr(archiveRetentionType));
|
||||
const String *msgArchiveOff = strNewFmt(
|
||||
"WAL segments will not be expired: option '" CFGOPT_REPO1_RETENTION_ARCHIVE_TYPE "=%s' but",
|
||||
strPtr(archiveRetentionType));
|
||||
|
||||
// If the archive retention is not explicitly set then determine what it should be defaulted to
|
||||
if (!cfgOptionTest(cfgOptRepoRetentionArchive + optionIdx))
|
||||
@ -218,11 +221,11 @@ cfgLoadUpdateOption(void)
|
||||
{
|
||||
THROW_FMT(
|
||||
OptionInvalidValueError,
|
||||
"'%s' is not valid for option '%s'"
|
||||
"'%s' is not valid for option '" CFGOPT_REPO1_S3_BUCKET "'"
|
||||
"\nHINT: RFC-2818 forbids dots in wildcard matches"
|
||||
"\nHINT: TLS/SSL verification cannot proceed with this bucket name"
|
||||
"\nHINT: remove dots from the bucket name",
|
||||
strPtr(cfgOptionStr(cfgOptRepoS3Bucket)), cfgOptionName(cfgOptRepoS3Bucket));
|
||||
strPtr(cfgOptionStr(cfgOptRepoS3Bucket)));
|
||||
}
|
||||
|
||||
FUNCTION_LOG_RETURN_VOID();
|
||||
|
File diff suppressed because it is too large
Load Diff
14
src/main.c
14
src/main.c
@ -66,8 +66,8 @@ main(int argListSize, const char *argList[])
|
||||
// Local command. Currently only implements a subset.
|
||||
// -------------------------------------------------------------------------------------------------------------------------
|
||||
else if (cfgCommand() == cfgCmdLocal &&
|
||||
(strEqZ(cfgOptionStr(cfgOptCommand), cfgCommandName(cfgCmdArchiveGetAsync)) ||
|
||||
strEqZ(cfgOptionStr(cfgOptCommand), cfgCommandName(cfgCmdArchivePushAsync))))
|
||||
(strEq(cfgOptionStr(cfgOptCommand), CFGCMD_ARCHIVE_GET_ASYNC_STR) ||
|
||||
strEq(cfgOptionStr(cfgOptCommand), CFGCMD_ARCHIVE_PUSH_ASYNC_STR)))
|
||||
{
|
||||
cmdLocal(STDIN_FILENO, STDOUT_FILENO);
|
||||
}
|
||||
@ -75,11 +75,11 @@ main(int argListSize, const char *argList[])
|
||||
// Remote command. Currently only implements a subset.
|
||||
// -------------------------------------------------------------------------------------------------------------------------
|
||||
else if (cfgCommand() == cfgCmdRemote &&
|
||||
(strEqZ(cfgOptionStr(cfgOptCommand), cfgCommandName(cfgCmdArchiveGet)) ||
|
||||
strEqZ(cfgOptionStr(cfgOptCommand), cfgCommandName(cfgCmdArchiveGetAsync)) ||
|
||||
strEqZ(cfgOptionStr(cfgOptCommand), cfgCommandName(cfgCmdArchivePush)) ||
|
||||
strEqZ(cfgOptionStr(cfgOptCommand), cfgCommandName(cfgCmdArchivePushAsync)) ||
|
||||
strEqZ(cfgOptionStr(cfgOptCommand), cfgCommandName(cfgCmdInfo))))
|
||||
(strEq(cfgOptionStr(cfgOptCommand), CFGCMD_ARCHIVE_GET_STR) ||
|
||||
strEq(cfgOptionStr(cfgOptCommand), CFGCMD_ARCHIVE_GET_ASYNC_STR) ||
|
||||
strEq(cfgOptionStr(cfgOptCommand), CFGCMD_ARCHIVE_PUSH_STR) ||
|
||||
strEq(cfgOptionStr(cfgOptCommand), CFGCMD_ARCHIVE_PUSH_ASYNC_STR) ||
|
||||
strEq(cfgOptionStr(cfgOptCommand), CFGCMD_INFO_STR)))
|
||||
{
|
||||
cmdRemote(STDIN_FILENO, STDOUT_FILENO);
|
||||
}
|
||||
|
@ -85,24 +85,24 @@ protocolLocalParam(ProtocolStorageType protocolStorageType, unsigned int protoco
|
||||
KeyValue *optionReplace = kvNew();
|
||||
|
||||
// Add the command option
|
||||
kvPut(optionReplace, varNewStr(strNew(cfgOptionName(cfgOptCommand))), varNewStr(strNew(cfgCommandName(cfgCommand()))));
|
||||
kvPut(optionReplace, varNewStr(CFGOPT_COMMAND_STR), varNewStr(strNew(cfgCommandName(cfgCommand()))));
|
||||
|
||||
// Add the process id -- used when more than one process will be called
|
||||
kvPut(optionReplace, varNewStr(strNew(cfgOptionName(cfgOptProcess))), varNewInt((int)protocolId));
|
||||
kvPut(optionReplace, varNewStr(CFGOPT_PROCESS_STR), varNewInt((int)protocolId));
|
||||
|
||||
// Add the host id -- for now this is hard-coded to 1
|
||||
kvPut(optionReplace, varNewStr(strNew(cfgOptionName(cfgOptHostId))), varNewInt(1));
|
||||
kvPut(optionReplace, varNewStr(CFGOPT_HOST_ID_STR), varNewInt(1));
|
||||
|
||||
// Add the type
|
||||
kvPut(optionReplace, varNewStr(strNew(cfgOptionName(cfgOptType))), varNewStr(strNew("backup")));
|
||||
kvPut(optionReplace, varNewStr(CFGOPT_TYPE_STR), varNewStr(strNew("backup")));
|
||||
|
||||
// Only enable file logging on the local when requested
|
||||
kvPut(
|
||||
optionReplace, varNewStr(strNew(cfgOptionName(cfgOptLogLevelFile))),
|
||||
optionReplace, varNewStr(CFGOPT_LOG_LEVEL_FILE_STR),
|
||||
cfgOptionBool(cfgOptLogSubprocess) ? cfgOption(cfgOptLogLevelFile) : varNewStrZ("off"));
|
||||
|
||||
// Always output errors on stderr for debugging purposes
|
||||
kvPut(optionReplace, varNewStr(strNew(cfgOptionName(cfgOptLogLevelStderr))), varNewStrZ("error"));
|
||||
kvPut(optionReplace, varNewStr(CFGOPT_LOG_LEVEL_STDERR_STR), varNewStrZ("error"));
|
||||
|
||||
result = strLstMove(cfgExecParam(cfgCmdLocal, optionReplace), MEM_CONTEXT_OLD());
|
||||
}
|
||||
@ -202,36 +202,36 @@ protocolRemoteParam(ProtocolStorageType protocolStorageType, unsigned int protoc
|
||||
|
||||
// Replace config options with the host versions
|
||||
if (cfgOptionSource(cfgOptRepoHostConfig) != cfgSourceDefault)
|
||||
kvPut(optionReplace, varNewStr(strNew(cfgOptionName(cfgOptConfig))), cfgOption(cfgOptRepoHostConfig));
|
||||
kvPut(optionReplace, varNewStr(CFGOPT_CONFIG_STR), cfgOption(cfgOptRepoHostConfig));
|
||||
|
||||
if (cfgOptionSource(cfgOptRepoHostConfigIncludePath) != cfgSourceDefault)
|
||||
kvPut(optionReplace, varNewStr(strNew(cfgOptionName(cfgOptConfigIncludePath))), cfgOption(cfgOptRepoHostConfigIncludePath));
|
||||
kvPut(optionReplace, varNewStr(CFGOPT_CONFIG_INCLUDE_PATH_STR), cfgOption(cfgOptRepoHostConfigIncludePath));
|
||||
|
||||
if (cfgOptionSource(cfgOptRepoHostConfigPath) != cfgSourceDefault)
|
||||
kvPut(optionReplace, varNewStr(strNew(cfgOptionName(cfgOptConfigPath))), cfgOption(cfgOptRepoHostConfigPath));
|
||||
kvPut(optionReplace, varNewStr(CFGOPT_CONFIG_PATH_STR), cfgOption(cfgOptRepoHostConfigPath));
|
||||
|
||||
// Add the command option (or use the current command option if it is valid)
|
||||
if (!cfgOptionTest(cfgOptCommand))
|
||||
kvPut(optionReplace, varNewStr(strNew(cfgOptionName(cfgOptCommand))), varNewStr(strNew(cfgCommandName(cfgCommand()))));
|
||||
kvPut(optionReplace, varNewStr(CFGOPT_COMMAND_STR), varNewStr(strNew(cfgCommandName(cfgCommand()))));
|
||||
|
||||
// Add the process id (or use the current process id if it is valid)
|
||||
if (!cfgOptionTest(cfgOptProcess))
|
||||
kvPut(optionReplace, varNewStr(strNew(cfgOptionName(cfgOptProcess))), varNewInt((int)protocolId));
|
||||
kvPut(optionReplace, varNewStr(CFGOPT_PROCESS_STR), varNewInt((int)protocolId));
|
||||
|
||||
// Don't pass log-path or lock-path since these are host specific
|
||||
kvPut(optionReplace, varNewStr(strNew(cfgOptionName(cfgOptLogPath))), NULL);
|
||||
kvPut(optionReplace, varNewStr(strNew(cfgOptionName(cfgOptLockPath))), NULL);
|
||||
kvPut(optionReplace, varNewStr(CFGOPT_LOG_PATH_STR), NULL);
|
||||
kvPut(optionReplace, varNewStr(CFGOPT_LOCK_PATH_STR), NULL);
|
||||
|
||||
// Only enable file logging on the remote when requested
|
||||
kvPut(
|
||||
optionReplace, varNewStr(strNew(cfgOptionName(cfgOptLogLevelFile))),
|
||||
optionReplace, varNewStr(CFGOPT_LOG_LEVEL_FILE_STR),
|
||||
cfgOptionBool(cfgOptLogSubprocess) ? cfgOption(cfgOptLogLevelFile) : varNewStrZ("off"));
|
||||
|
||||
// Always output errors on stderr for debugging purposes
|
||||
kvPut(optionReplace, varNewStr(strNew(cfgOptionName(cfgOptLogLevelStderr))), varNewStrZ("error"));
|
||||
kvPut(optionReplace, varNewStr(CFGOPT_LOG_LEVEL_STDERR_STR), varNewStrZ("error"));
|
||||
|
||||
// Add the type
|
||||
kvPut(optionReplace, varNewStr(strNew(cfgOptionName(cfgOptType))), varNewStr(strNew("backup")));
|
||||
kvPut(optionReplace, varNewStr(CFGOPT_TYPE_STR), varNewStr(strNew("backup")));
|
||||
|
||||
StringList *commandExec = cfgExecParam(cfgCmdRemote, optionReplace);
|
||||
strLstInsert(commandExec, 0, cfgOptionStr(cfgOptRepoHostCmd));
|
||||
@ -302,8 +302,8 @@ protocolRemoteGet(ProtocolStorageType protocolStorageType)
|
||||
{
|
||||
// Options to query
|
||||
VariantList *param = varLstNew();
|
||||
varLstAdd(param, varNewStr(strNew(cfgOptionName(cfgOptRepoCipherType))));
|
||||
varLstAdd(param, varNewStr(strNew(cfgOptionName(cfgOptRepoCipherPass))));
|
||||
varLstAdd(param, varNewStr(CFGOPT_REPO1_CIPHER_TYPE_STR));
|
||||
varLstAdd(param, varNewStr(CFGOPT_REPO1_CIPHER_PASS_STR));
|
||||
|
||||
VariantList *optionList = configProtocolOption(protocolHelperClient->client, param);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user