2017-08-25 22:47:47 +02:00
|
|
|
####################################################################################################################################
|
2017-11-02 14:14:13 +02:00
|
|
|
# Configuration Definition Data
|
2017-08-25 22:47:47 +02:00
|
|
|
#
|
2017-11-02 14:14:13 +02:00
|
|
|
# Contains the defines for options: which commands the option can/cannot be specified, for which commands it is required, default
|
2017-08-25 22:47:47 +02:00
|
|
|
# settings, types, ranges, whether the option is negatable, whether it has dependencies, etc. The initial section is the global
|
2017-11-02 14:14:13 +02:00
|
|
|
# section meaning the defines defined there apply to all commands listed for the option.
|
2017-08-25 22:47:47 +02:00
|
|
|
#
|
2018-02-05 18:50:09 +02:00
|
|
|
# CFGDEF_INHERIT:
|
|
|
|
# Inherit all definitions for the referenced option. Any definitions can be overridden.
|
|
|
|
#
|
2017-11-02 14:14:13 +02:00
|
|
|
# CFGDEF_COMMAND:
|
2017-09-01 01:15:44 +02:00
|
|
|
# List of commands the option can be used with this option. An empty hash signifies that the command does not deviate from the
|
2017-08-25 22:47:47 +02:00
|
|
|
# option defaults. Otherwise, overrides can be specified.
|
|
|
|
#
|
|
|
|
# NOTE: If the option (A) has a dependency on another option (B) then the CFGCMD_ must also be specified in the other option
|
|
|
|
# (B), else it will still error on the option (A).
|
|
|
|
#
|
2017-11-02 14:14:13 +02:00
|
|
|
# CFGDEF_REQUIRED:
|
2017-08-25 22:47:47 +02:00
|
|
|
# In global section:
|
2017-11-02 14:14:13 +02:00
|
|
|
# true - if the option does not have a default, then setting CFGDEF_REQUIRED in the global section means all commands
|
|
|
|
# listed in CFGDEF_COMMAND require the user to set it.
|
2017-08-25 22:47:47 +02:00
|
|
|
# false - no commands listed require it as an option but it can be set. This can be overridden for individual commands by
|
2017-11-02 14:14:13 +02:00
|
|
|
# setting CFGDEF_REQUIRED in the CFGDEF_COMMAND section.
|
|
|
|
# In CFGDEF_COMMAND section:
|
|
|
|
# true - the option must be set somehow for the command, either by default (CFGDEF_DEFAULT) or by the user.
|
2019-12-19 23:25:46 +02:00
|
|
|
# &CFGCMD_CHECK =>
|
|
|
|
# {
|
|
|
|
# &CFGDEF_REQUIRED => true
|
|
|
|
# },
|
2017-11-02 14:14:13 +02:00
|
|
|
# false - mainly used for overriding the CFGDEF_REQUIRED in the global section.
|
2017-08-25 22:47:47 +02:00
|
|
|
#
|
2017-11-02 14:14:13 +02:00
|
|
|
# CFGDEF_DEFAULT:
|
2017-08-25 22:47:47 +02:00
|
|
|
# Sets a default for the option for all commands if listed in the global section, or for specific commands if listed in the
|
2019-10-08 21:27:17 +02:00
|
|
|
# CFGDEF_COMMAND section. All boolean types require a default.
|
2017-08-25 22:47:47 +02:00
|
|
|
#
|
2017-11-02 14:14:13 +02:00
|
|
|
# CFGDEF_NEGATE:
|
2019-10-08 21:27:17 +02:00
|
|
|
# The option can be negated with "no" e.g. --no-compress. This applies to options that are only valid on the command line (i.e.
|
|
|
|
# no config section defined) and if not specifically defined, the default is false. All config file boolean options are
|
|
|
|
# automatically negatable.
|
2017-08-25 22:47:47 +02:00
|
|
|
#
|
2018-02-06 18:26:06 +02:00
|
|
|
# CFGDEF_RESET:
|
|
|
|
# The option can be reset to default even if the default is undefined.
|
|
|
|
#
|
2017-11-02 14:14:13 +02:00
|
|
|
# CFGDEF_DEPEND:
|
2017-08-25 22:47:47 +02:00
|
|
|
# Specify the dependencies this option has on another option. All commands listed for this option must also be listed in the
|
|
|
|
# dependent option(s).
|
2017-11-02 14:14:13 +02:00
|
|
|
# CFGDEF_DEPEND_LIST further defines the allowable settings for the depended option.
|
2017-08-25 22:47:47 +02:00
|
|
|
#
|
2017-11-02 14:14:13 +02:00
|
|
|
# CFGDEF_ALLOW_LIST:
|
2017-08-25 22:47:47 +02:00
|
|
|
# Lists the allowable settings for the option.
|
2017-12-05 21:46:52 +02:00
|
|
|
#
|
|
|
|
# CFGDEF_INTERNAL:
|
|
|
|
# Option is used by the command internally but is not exposed in the documentation. This is useful for commands that need to know
|
|
|
|
# where they are running by looking at other options in the config. Also good for test options.
|
2017-08-25 22:47:47 +02:00
|
|
|
####################################################################################################################################
|
2017-11-27 00:45:00 +02:00
|
|
|
package pgBackRestBuild::Config::Data;
|
2017-08-25 22:47:47 +02:00
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings FATAL => qw(all);
|
|
|
|
use Carp qw(confess);
|
|
|
|
|
|
|
|
use Cwd qw(abs_path);
|
|
|
|
use Exporter qw(import);
|
|
|
|
our @EXPORT = qw();
|
|
|
|
use File::Basename qw(dirname basename);
|
|
|
|
use Getopt::Long qw(GetOptions);
|
|
|
|
use Storable qw(dclone);
|
|
|
|
|
2020-03-10 21:41:56 +02:00
|
|
|
use pgBackRestDoc::Common::Exception;
|
|
|
|
use pgBackRestDoc::Common::Log;
|
2020-03-10 23:57:02 +02:00
|
|
|
use pgBackRestDoc::ProjectInfo;
|
2020-03-10 21:12:44 +02:00
|
|
|
|
|
|
|
use pgBackRestTest::Common::Wait;
|
|
|
|
|
2017-08-25 22:47:47 +02:00
|
|
|
####################################################################################################################################
|
2018-11-25 02:05:03 +02:00
|
|
|
# Command constants - commands that are allowed in the exe
|
2017-08-25 22:47:47 +02:00
|
|
|
####################################################################################################################################
|
|
|
|
use constant CFGCMD_ARCHIVE_GET => 'archive-get';
|
|
|
|
use constant CFGCMD_ARCHIVE_PUSH => 'archive-push';
|
|
|
|
use constant CFGCMD_BACKUP => 'backup';
|
|
|
|
push @EXPORT, qw(CFGCMD_BACKUP);
|
|
|
|
use constant CFGCMD_CHECK => 'check';
|
|
|
|
use constant CFGCMD_EXPIRE => 'expire';
|
|
|
|
use constant CFGCMD_HELP => 'help';
|
|
|
|
push @EXPORT, qw(CFGCMD_HELP);
|
|
|
|
use constant CFGCMD_INFO => 'info';
|
|
|
|
push @EXPORT, qw(CFGCMD_INFO);
|
2020-03-09 23:15:03 +02:00
|
|
|
use constant CFGCMD_REPO_CREATE => 'repo-create';
|
|
|
|
use constant CFGCMD_REPO_GET => 'repo-get';
|
2020-03-09 22:41:04 +02:00
|
|
|
use constant CFGCMD_REPO_LS => 'repo-ls';
|
2020-03-09 23:15:03 +02:00
|
|
|
use constant CFGCMD_REPO_PUT => 'repo-put';
|
|
|
|
use constant CFGCMD_REPO_RM => 'repo-rm';
|
2017-08-25 22:47:47 +02:00
|
|
|
use constant CFGCMD_RESTORE => 'restore';
|
|
|
|
use constant CFGCMD_STANZA_CREATE => 'stanza-create';
|
2018-01-03 19:23:33 +02:00
|
|
|
use constant CFGCMD_STANZA_DELETE => 'stanza-delete';
|
2017-08-25 22:47:47 +02:00
|
|
|
use constant CFGCMD_STANZA_UPGRADE => 'stanza-upgrade';
|
|
|
|
use constant CFGCMD_START => 'start';
|
|
|
|
use constant CFGCMD_STOP => 'stop';
|
2020-09-22 17:57:38 +02:00
|
|
|
use constant CFGCMD_VERIFY => 'verify';
|
2017-08-25 22:47:47 +02:00
|
|
|
use constant CFGCMD_VERSION => 'version';
|
|
|
|
|
|
|
|
####################################################################################################################################
|
|
|
|
# Option constants - options that are allowed for commands
|
|
|
|
####################################################################################################################################
|
|
|
|
|
|
|
|
# Command-line only options
|
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
use constant CFGOPT_CONFIG => 'config';
|
|
|
|
push @EXPORT, qw(CFGOPT_CONFIG);
|
2018-04-19 17:09:39 +02:00
|
|
|
use constant CFGOPT_CONFIG_PATH => 'config-path';
|
|
|
|
use constant CFGOPT_CONFIG_INCLUDE_PATH => 'config-include-path';
|
2017-08-25 22:47:47 +02:00
|
|
|
use constant CFGOPT_DELTA => 'delta';
|
2020-03-16 19:56:52 +02:00
|
|
|
use constant CFGOPT_DRYRUN => 'dry-run';
|
2017-08-25 22:47:47 +02:00
|
|
|
use constant CFGOPT_FORCE => 'force';
|
|
|
|
use constant CFGOPT_ONLINE => 'online';
|
|
|
|
use constant CFGOPT_SET => 'set';
|
|
|
|
use constant CFGOPT_STANZA => 'stanza';
|
|
|
|
push @EXPORT, qw(CFGOPT_STANZA);
|
|
|
|
use constant CFGOPT_TARGET => 'target';
|
|
|
|
use constant CFGOPT_TARGET_EXCLUSIVE => 'target-exclusive';
|
|
|
|
use constant CFGOPT_TARGET_ACTION => 'target-action';
|
|
|
|
use constant CFGOPT_TARGET_TIMELINE => 'target-timeline';
|
|
|
|
use constant CFGOPT_TYPE => 'type';
|
|
|
|
use constant CFGOPT_OUTPUT => 'output';
|
|
|
|
|
2019-05-09 14:55:48 +02:00
|
|
|
# Command-line only local/remote options
|
2017-08-25 22:47:47 +02:00
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
use constant CFGOPT_PROCESS => 'process';
|
|
|
|
use constant CFGOPT_HOST_ID => 'host-id';
|
2020-01-09 03:59:02 +02:00
|
|
|
use constant CFGOPT_REMOTE_TYPE => 'remote-type';
|
2017-08-25 22:47:47 +02:00
|
|
|
|
2019-05-28 16:03:48 +02:00
|
|
|
# Command-line only storage options
|
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
2020-03-09 23:15:03 +02:00
|
|
|
use constant CFGOPT_CIPHER_PASS => 'cipher-pass';
|
2019-05-28 16:03:48 +02:00
|
|
|
use constant CFGOPT_FILTER => 'filter';
|
2020-03-09 23:15:03 +02:00
|
|
|
use constant CFGOPT_IGNORE_MISSING => 'ignore-missing';
|
|
|
|
use constant CFGOPT_RAW => 'raw';
|
2019-09-12 22:29:50 +02:00
|
|
|
use constant CFGOPT_RECURSE => 'recurse';
|
2019-05-28 16:03:48 +02:00
|
|
|
use constant CFGOPT_SORT => 'sort';
|
|
|
|
|
2017-08-25 22:47:47 +02:00
|
|
|
# General options
|
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
use constant CFGOPT_ARCHIVE_TIMEOUT => 'archive-timeout';
|
|
|
|
use constant CFGOPT_BUFFER_SIZE => 'buffer-size';
|
|
|
|
use constant CFGOPT_DB_TIMEOUT => 'db-timeout';
|
|
|
|
use constant CFGOPT_COMPRESS => 'compress';
|
2020-03-06 21:41:03 +02:00
|
|
|
use constant CFGOPT_COMPRESS_TYPE => 'compress-type';
|
2017-08-25 22:47:47 +02:00
|
|
|
use constant CFGOPT_COMPRESS_LEVEL => 'compress-level';
|
|
|
|
use constant CFGOPT_COMPRESS_LEVEL_NETWORK => 'compress-level-network';
|
2020-04-17 15:18:52 +02:00
|
|
|
use constant CFGOPT_IO_TIMEOUT => 'io-timeout';
|
2017-08-25 22:47:47 +02:00
|
|
|
use constant CFGOPT_NEUTRAL_UMASK => 'neutral-umask';
|
|
|
|
use constant CFGOPT_PROTOCOL_TIMEOUT => 'protocol-timeout';
|
|
|
|
use constant CFGOPT_PROCESS_MAX => 'process-max';
|
2020-04-17 15:55:40 +02:00
|
|
|
use constant CFGOPT_SCK_BLOCK => 'sck-block';
|
2020-04-01 21:44:51 +02:00
|
|
|
use constant CFGOPT_SCK_KEEP_ALIVE => 'sck-keep-alive';
|
2020-04-01 00:13:11 +02:00
|
|
|
use constant CFGOPT_TCP_KEEP_ALIVE_COUNT => 'tcp-keep-alive-count';
|
|
|
|
use constant CFGOPT_TCP_KEEP_ALIVE_IDLE => 'tcp-keep-alive-idle';
|
|
|
|
use constant CFGOPT_TCP_KEEP_ALIVE_INTERVAL => 'tcp-keep-alive-interval';
|
2017-08-25 22:47:47 +02:00
|
|
|
|
|
|
|
# Commands
|
|
|
|
use constant CFGOPT_CMD_SSH => 'cmd-ssh';
|
|
|
|
|
|
|
|
# Paths
|
|
|
|
use constant CFGOPT_LOCK_PATH => 'lock-path';
|
|
|
|
push @EXPORT, qw(CFGOPT_LOCK_PATH);
|
|
|
|
use constant CFGOPT_LOG_PATH => 'log-path';
|
|
|
|
push @EXPORT, qw(CFGOPT_LOG_PATH);
|
|
|
|
use constant CFGOPT_SPOOL_PATH => 'spool-path';
|
|
|
|
push @EXPORT, qw(CFGOPT_SPOOL_PATH);
|
|
|
|
|
2018-02-04 01:27:38 +02:00
|
|
|
# Logging
|
|
|
|
use constant CFGOPT_LOG_LEVEL_CONSOLE => 'log-level-console';
|
|
|
|
use constant CFGOPT_LOG_LEVEL_FILE => 'log-level-file';
|
|
|
|
use constant CFGOPT_LOG_LEVEL_STDERR => 'log-level-stderr';
|
|
|
|
push @EXPORT, qw(CFGOPT_LOG_LEVEL_STDERR);
|
2018-08-23 02:05:49 +02:00
|
|
|
use constant CFGOPT_LOG_SUBPROCESS => 'log-subprocess';
|
2018-02-04 01:27:38 +02:00
|
|
|
use constant CFGOPT_LOG_TIMESTAMP => 'log-timestamp';
|
|
|
|
push @EXPORT, qw(CFGOPT_LOG_TIMESTAMP);
|
|
|
|
|
|
|
|
# Repository options
|
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
# Determines how many repositories can be configured
|
|
|
|
use constant CFGDEF_INDEX_REPO => 1;
|
|
|
|
|
|
|
|
# Prefix that must be used by all repo options that allow multiple configurations
|
|
|
|
use constant CFGDEF_PREFIX_REPO => 'repo';
|
|
|
|
|
|
|
|
# Repository General
|
2018-02-19 17:12:51 +02:00
|
|
|
use constant CFGOPT_REPO_CIPHER_TYPE => CFGDEF_PREFIX_REPO . '-cipher-type';
|
|
|
|
use constant CFGOPT_REPO_CIPHER_PASS => CFGDEF_PREFIX_REPO . '-cipher-pass';
|
|
|
|
use constant CFGOPT_REPO_HARDLINK => CFGDEF_PREFIX_REPO . '-hardlink';
|
|
|
|
use constant CFGOPT_REPO_PATH => CFGDEF_PREFIX_REPO . '-path';
|
2018-02-04 01:27:38 +02:00
|
|
|
push @EXPORT, qw(CFGOPT_REPO_PATH);
|
2018-02-19 17:12:51 +02:00
|
|
|
use constant CFGOPT_REPO_TYPE => CFGDEF_PREFIX_REPO . '-type';
|
2018-02-04 01:27:38 +02:00
|
|
|
|
2018-02-19 22:07:24 +02:00
|
|
|
# Repository Retention
|
|
|
|
use constant CFGOPT_REPO_RETENTION_ARCHIVE => CFGDEF_PREFIX_REPO . '-retention-archive';
|
|
|
|
use constant CFGOPT_REPO_RETENTION_ARCHIVE_TYPE => CFGDEF_PREFIX_REPO . '-retention-archive-type';
|
|
|
|
use constant CFGOPT_REPO_RETENTION_DIFF => CFGDEF_PREFIX_REPO . '-retention-diff';
|
|
|
|
use constant CFGOPT_REPO_RETENTION_FULL => CFGDEF_PREFIX_REPO . '-retention-full';
|
2020-05-08 21:25:03 +02:00
|
|
|
use constant CFGOPT_REPO_RETENTION_FULL_TYPE => CFGDEF_PREFIX_REPO . '-retention-full-type';
|
2018-02-19 22:07:24 +02:00
|
|
|
|
2018-02-04 01:27:38 +02:00
|
|
|
# Repository Host
|
2020-05-22 19:51:26 +02:00
|
|
|
use constant CFGOPT_REPO_LOCAL => CFGDEF_PREFIX_REPO . '-local';
|
|
|
|
|
2018-02-19 17:12:51 +02:00
|
|
|
use constant CFGOPT_REPO_HOST => CFGDEF_PREFIX_REPO . '-host';
|
|
|
|
use constant CFGOPT_REPO_HOST_CMD => CFGOPT_REPO_HOST . '-cmd';
|
2018-02-04 01:27:38 +02:00
|
|
|
push @EXPORT, qw(CFGOPT_REPO_HOST_CMD);
|
2018-02-19 17:12:51 +02:00
|
|
|
use constant CFGOPT_REPO_HOST_CONFIG => CFGOPT_REPO_HOST . '-config';
|
2018-04-19 17:09:39 +02:00
|
|
|
use constant CFGOPT_REPO_HOST_CONFIG_INCLUDE_PATH => CFGOPT_REPO_HOST_CONFIG . '-include-path';
|
|
|
|
use constant CFGOPT_REPO_HOST_CONFIG_PATH => CFGOPT_REPO_HOST_CONFIG . '-path';
|
2018-02-19 17:12:51 +02:00
|
|
|
use constant CFGOPT_REPO_HOST_PORT => CFGOPT_REPO_HOST . '-port';
|
|
|
|
use constant CFGOPT_REPO_HOST_USER => CFGOPT_REPO_HOST . '-user';
|
2017-08-25 22:47:47 +02:00
|
|
|
|
2020-07-02 22:24:34 +02:00
|
|
|
# Repository Azure
|
|
|
|
use constant CFGDEF_REPO_AZURE => CFGDEF_PREFIX_REPO . '-azure';
|
|
|
|
use constant CFGOPT_REPO_AZURE_ACCOUNT => CFGDEF_REPO_AZURE . '-account';
|
|
|
|
use constant CFGOPT_REPO_AZURE_CA_FILE => CFGDEF_REPO_AZURE . '-ca-file';
|
|
|
|
use constant CFGOPT_REPO_AZURE_CA_PATH => CFGDEF_REPO_AZURE . '-ca-path';
|
|
|
|
use constant CFGOPT_REPO_AZURE_CONTAINER => CFGDEF_REPO_AZURE . '-container';
|
|
|
|
use constant CFGOPT_REPO_AZURE_HOST => CFGDEF_REPO_AZURE . '-host';
|
|
|
|
use constant CFGOPT_REPO_AZURE_KEY => CFGDEF_REPO_AZURE . '-key';
|
2020-07-09 20:46:48 +02:00
|
|
|
use constant CFGOPT_REPO_AZURE_KEY_TYPE => CFGDEF_REPO_AZURE . '-key-type';
|
2020-07-02 22:24:34 +02:00
|
|
|
use constant CFGOPT_REPO_AZURE_PORT => CFGDEF_REPO_AZURE . '-port';
|
|
|
|
use constant CFGOPT_REPO_AZURE_VERIFY_TLS => CFGDEF_REPO_AZURE . '-verify-tls';
|
|
|
|
|
2017-08-25 22:47:47 +02:00
|
|
|
# Repository S3
|
2018-02-19 17:12:51 +02:00
|
|
|
use constant CFGDEF_REPO_S3 => CFGDEF_PREFIX_REPO . '-s3';
|
|
|
|
use constant CFGOPT_REPO_S3_KEY => CFGDEF_REPO_S3 . '-key';
|
|
|
|
use constant CFGOPT_REPO_S3_KEY_SECRET => CFGDEF_REPO_S3 . '-key-secret';
|
2020-08-25 16:38:49 +02:00
|
|
|
use constant CFGOPT_REPO_S3_KEY_TYPE => CFGDEF_REPO_S3 . '-key-type';
|
2018-02-19 17:12:51 +02:00
|
|
|
use constant CFGOPT_REPO_S3_BUCKET => CFGDEF_REPO_S3 . '-bucket';
|
|
|
|
use constant CFGOPT_REPO_S3_CA_FILE => CFGDEF_REPO_S3 . '-ca-file';
|
|
|
|
use constant CFGOPT_REPO_S3_CA_PATH => CFGDEF_REPO_S3 . '-ca-path';
|
|
|
|
use constant CFGOPT_REPO_S3_ENDPOINT => CFGDEF_REPO_S3 . '-endpoint';
|
|
|
|
use constant CFGOPT_REPO_S3_HOST => CFGDEF_REPO_S3 . '-host';
|
2019-07-25 23:36:51 +02:00
|
|
|
use constant CFGOPT_REPO_S3_PORT => CFGDEF_REPO_S3 . '-port';
|
2020-08-25 16:38:49 +02:00
|
|
|
use constant CFGOPT_REPO_S3_ROLE => CFGDEF_REPO_S3 . '-role';
|
2018-02-19 17:12:51 +02:00
|
|
|
use constant CFGOPT_REPO_S3_REGION => CFGDEF_REPO_S3 . '-region';
|
2018-05-02 20:06:40 +02:00
|
|
|
use constant CFGOPT_REPO_S3_TOKEN => CFGDEF_REPO_S3 . '-token';
|
2020-01-12 20:31:06 +02:00
|
|
|
use constant CFGOPT_REPO_S3_URI_STYLE => CFGDEF_REPO_S3 . '-uri-style';
|
2019-05-21 16:14:41 +02:00
|
|
|
use constant CFGOPT_REPO_S3_VERIFY_TLS => CFGDEF_REPO_S3 . '-verify-tls';
|
2017-08-25 22:47:47 +02:00
|
|
|
|
|
|
|
# Archive options
|
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
use constant CFGOPT_ARCHIVE_ASYNC => 'archive-async';
|
2018-04-30 23:27:39 +02:00
|
|
|
use constant CFGOPT_ARCHIVE_GET_QUEUE_MAX => 'archive-get-queue-max';
|
2018-04-19 01:37:35 +02:00
|
|
|
use constant CFGOPT_ARCHIVE_PUSH_QUEUE_MAX => 'archive-push-queue-max';
|
2017-08-25 22:47:47 +02:00
|
|
|
|
|
|
|
# Backup options
|
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
use constant CFGOPT_ARCHIVE_CHECK => 'archive-check';
|
|
|
|
use constant CFGOPT_ARCHIVE_COPY => 'archive-copy';
|
|
|
|
use constant CFGOPT_BACKUP_STANDBY => 'backup-standby';
|
|
|
|
use constant CFGOPT_CHECKSUM_PAGE => 'checksum-page';
|
2018-08-27 21:51:05 +02:00
|
|
|
use constant CFGOPT_EXCLUDE => 'exclude';
|
2020-07-14 14:12:25 +02:00
|
|
|
use constant CFGOPT_EXPIRE_AUTO => 'expire-auto';
|
2017-08-25 22:47:47 +02:00
|
|
|
use constant CFGOPT_MANIFEST_SAVE_THRESHOLD => 'manifest-save-threshold';
|
|
|
|
use constant CFGOPT_RESUME => 'resume';
|
|
|
|
use constant CFGOPT_START_FAST => 'start-fast';
|
|
|
|
use constant CFGOPT_STOP_AUTO => 'stop-auto';
|
|
|
|
|
|
|
|
# Restore options
|
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
2020-08-25 21:05:41 +02:00
|
|
|
use constant CFGOPT_ARCHIVE_MODE => 'archive-mode';
|
2017-08-25 22:47:47 +02:00
|
|
|
use constant CFGOPT_DB_INCLUDE => 'db-include';
|
|
|
|
use constant CFGOPT_LINK_ALL => 'link-all';
|
|
|
|
use constant CFGOPT_LINK_MAP => 'link-map';
|
|
|
|
use constant CFGOPT_TABLESPACE_MAP_ALL => 'tablespace-map-all';
|
|
|
|
use constant CFGOPT_TABLESPACE_MAP => 'tablespace-map';
|
|
|
|
use constant CFGOPT_RECOVERY_OPTION => 'recovery-option';
|
|
|
|
|
|
|
|
# Stanza options
|
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
# Determines how many databases can be configured
|
2018-02-04 01:27:38 +02:00
|
|
|
use constant CFGDEF_INDEX_PG => 8;
|
|
|
|
push @EXPORT, qw(CFGDEF_INDEX_PG);
|
2017-08-25 22:47:47 +02:00
|
|
|
|
|
|
|
# Prefix that must be used by all db options that allow multiple configurations
|
2018-02-04 01:27:38 +02:00
|
|
|
use constant CFGDEF_PREFIX_PG => 'pg';
|
|
|
|
push @EXPORT, qw(CFGDEF_PREFIX_PG);
|
|
|
|
|
2020-05-22 19:51:26 +02:00
|
|
|
use constant CFGOPT_PG_LOCAL => CFGDEF_PREFIX_PG . '-local';
|
|
|
|
|
2018-02-04 01:27:38 +02:00
|
|
|
use constant CFGOPT_PG_HOST => CFGDEF_PREFIX_PG . '-host';
|
|
|
|
use constant CFGOPT_PG_HOST_CMD => CFGOPT_PG_HOST . '-cmd';
|
|
|
|
push @EXPORT, qw(CFGOPT_PG_HOST_CMD);
|
|
|
|
use constant CFGOPT_PG_HOST_CONFIG => CFGOPT_PG_HOST . '-config';
|
2018-04-19 17:09:39 +02:00
|
|
|
use constant CFGOPT_PG_HOST_CONFIG_INCLUDE_PATH => CFGOPT_PG_HOST_CONFIG . '-include-path';
|
|
|
|
use constant CFGOPT_PG_HOST_CONFIG_PATH => CFGOPT_PG_HOST_CONFIG . '-path';
|
2018-02-04 01:27:38 +02:00
|
|
|
use constant CFGOPT_PG_HOST_PORT => CFGOPT_PG_HOST . '-port';
|
|
|
|
use constant CFGOPT_PG_HOST_USER => CFGOPT_PG_HOST . '-user';
|
|
|
|
|
|
|
|
use constant CFGOPT_PG_PATH => CFGDEF_PREFIX_PG . '-path';
|
|
|
|
use constant CFGOPT_PG_PORT => CFGDEF_PREFIX_PG . '-port';
|
|
|
|
use constant CFGOPT_PG_SOCKET_PATH => CFGDEF_PREFIX_PG . '-socket-path';
|
2019-12-19 18:26:38 +02:00
|
|
|
use constant CFGOPT_PG_USER => CFGDEF_PREFIX_PG . '-user';
|
2017-08-25 22:47:47 +02:00
|
|
|
|
|
|
|
####################################################################################################################################
|
|
|
|
# Option values - for options that have a specific list of allowed values
|
|
|
|
####################################################################################################################################
|
|
|
|
|
2020-01-09 03:59:02 +02:00
|
|
|
# Storage types
|
2017-08-25 22:47:47 +02:00
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
2020-01-09 03:59:02 +02:00
|
|
|
use constant CFGOPTVAL_STORAGE_TYPE_PG => 'pg';
|
|
|
|
use constant CFGOPTVAL_STORAGE_TYPE_REPO => 'repo';
|
2017-08-25 22:47:47 +02:00
|
|
|
|
|
|
|
# Backup type
|
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
use constant CFGOPTVAL_BACKUP_TYPE_FULL => 'full';
|
|
|
|
use constant CFGOPTVAL_BACKUP_TYPE_DIFF => 'diff';
|
|
|
|
use constant CFGOPTVAL_BACKUP_TYPE_INCR => 'incr';
|
|
|
|
|
|
|
|
# Repo type
|
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
2020-07-02 22:24:34 +02:00
|
|
|
use constant CFGOPTVAL_REPO_TYPE_AZURE => 'azure';
|
2017-08-25 22:47:47 +02:00
|
|
|
use constant CFGOPTVAL_REPO_TYPE_CIFS => 'cifs';
|
|
|
|
use constant CFGOPTVAL_REPO_TYPE_POSIX => 'posix';
|
|
|
|
use constant CFGOPTVAL_REPO_TYPE_S3 => 's3';
|
|
|
|
|
2017-11-06 19:51:12 +02:00
|
|
|
# Repo encryption type
|
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
2018-11-21 02:24:53 +02:00
|
|
|
use constant CFGOPTVAL_REPO_CIPHER_TYPE_NONE => 'none';
|
|
|
|
use constant CFGOPTVAL_REPO_CIPHER_TYPE_AES_256_CBC => 'aes-256-cbc';
|
2017-11-06 19:51:12 +02:00
|
|
|
|
2020-01-12 20:31:06 +02:00
|
|
|
# Repo S3 URI style
|
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
use constant CFGOPTVAL_REPO_S3_URI_STYLE_HOST => 'host';
|
|
|
|
use constant CFGOPTVAL_REPO_S3_URI_STYLE_PATH => 'path';
|
|
|
|
|
2017-08-25 22:47:47 +02:00
|
|
|
# Info output
|
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
2019-09-12 22:29:50 +02:00
|
|
|
use constant CFGOPTVAL_OUTPUT_TEXT => 'text';
|
|
|
|
use constant CFGOPTVAL_OUTPUT_JSON => 'json';
|
2017-08-25 22:47:47 +02:00
|
|
|
|
|
|
|
# Restore type
|
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
use constant CFGOPTVAL_RESTORE_TYPE_NAME => 'name';
|
|
|
|
use constant CFGOPTVAL_RESTORE_TYPE_TIME => 'time';
|
|
|
|
use constant CFGOPTVAL_RESTORE_TYPE_XID => 'xid';
|
|
|
|
use constant CFGOPTVAL_RESTORE_TYPE_PRESERVE => 'preserve';
|
|
|
|
use constant CFGOPTVAL_RESTORE_TYPE_NONE => 'none';
|
|
|
|
use constant CFGOPTVAL_RESTORE_TYPE_IMMEDIATE => 'immediate';
|
|
|
|
use constant CFGOPTVAL_RESTORE_TYPE_DEFAULT => 'default';
|
2019-09-26 23:39:45 +02:00
|
|
|
use constant CFGOPTVAL_RESTORE_TYPE_STANDBY => 'standby';
|
2017-08-25 22:47:47 +02:00
|
|
|
|
|
|
|
# Restore target action
|
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
use constant CFGOPTVAL_RESTORE_TARGET_ACTION_PAUSE => 'pause';
|
|
|
|
use constant CFGOPTVAL_RESTORE_TARGET_ACTION_PROMOTE => 'promote';
|
|
|
|
use constant CFGOPTVAL_RESTORE_TARGET_ACTION_SHUTDOWN => 'shutdown';
|
|
|
|
|
|
|
|
####################################################################################################################################
|
|
|
|
# Option defaults - only defined here when the default is used in more than one place
|
|
|
|
####################################################################################################################################
|
|
|
|
use constant CFGDEF_DEFAULT_BUFFER_SIZE_MIN => 16384;
|
|
|
|
|
|
|
|
use constant CFGDEF_DEFAULT_COMPRESS_LEVEL_MIN => 0;
|
|
|
|
use constant CFGDEF_DEFAULT_COMPRESS_LEVEL_MAX => 9;
|
|
|
|
|
2018-11-25 02:05:03 +02:00
|
|
|
use constant CFGDEF_DEFAULT_CONFIG_PATH => '/etc/' . PROJECT_EXE;
|
|
|
|
use constant CFGDEF_DEFAULT_CONFIG => CFGDEF_DEFAULT_CONFIG_PATH . '/' . PROJECT_CONF;
|
2018-04-19 17:09:39 +02:00
|
|
|
use constant CFGDEF_DEFAULT_CONFIG_INCLUDE_PATH => CFGDEF_DEFAULT_CONFIG_PATH . '/conf.d';
|
2017-08-25 22:47:47 +02:00
|
|
|
|
|
|
|
use constant CFGDEF_DEFAULT_DB_TIMEOUT => 1800;
|
|
|
|
use constant CFGDEF_DEFAULT_DB_TIMEOUT_MIN => WAIT_TIME_MINIMUM;
|
|
|
|
use constant CFGDEF_DEFAULT_DB_TIMEOUT_MAX => 86400 * 7;
|
|
|
|
|
2018-02-09 22:42:11 +02:00
|
|
|
use constant CFGDEF_DEFAULT_PROTOCOL_PORT_MIN => 0;
|
|
|
|
use constant CFGDEF_DEFAULT_PROTOCOL_PORT_MAX => 65535;
|
|
|
|
|
2017-08-25 22:47:47 +02:00
|
|
|
use constant CFGDEF_DEFAULT_RETENTION_MIN => 1;
|
2017-11-02 14:14:13 +02:00
|
|
|
use constant CFGDEF_DEFAULT_RETENTION_MAX => 9999999;
|
2017-08-25 22:47:47 +02:00
|
|
|
|
|
|
|
####################################################################################################################################
|
2017-11-02 14:14:13 +02:00
|
|
|
# Option definition constants - defines, types, sections, etc.
|
2017-08-25 22:47:47 +02:00
|
|
|
####################################################################################################################################
|
|
|
|
|
2018-03-12 16:55:58 +02:00
|
|
|
# Command defines
|
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
# Does this command log to a file? This is the default behavior, but it can be overridden in code by calling logFileInit(). The
|
|
|
|
# default is true.
|
|
|
|
use constant CFGDEF_LOG_FILE => 'log-file';
|
|
|
|
push @EXPORT, qw(CFGDEF_LOG_FILE);
|
|
|
|
|
|
|
|
# Defines the log level to use for default messages that are output for every command. For example, the log message that lists all
|
|
|
|
# the options passed is usually output at the info level, but that might not be appropriate for some commands, such as info. Allow
|
2019-08-26 18:05:36 +02:00
|
|
|
# the log level to be lowered so these common messages will not be emitted where they might be distracting.
|
2018-03-12 16:55:58 +02:00
|
|
|
use constant CFGDEF_LOG_LEVEL_DEFAULT => 'log-level-default';
|
|
|
|
push @EXPORT, qw(CFGDEF_LOG_LEVEL_DEFAULT);
|
|
|
|
|
2018-04-11 15:36:12 +02:00
|
|
|
# Does the command require a lock? This doesn't mean a lock can't be taken explicitly later, just controls whether a lock will be
|
|
|
|
# acquired as soon at the command starts.
|
|
|
|
use constant CFGDEF_LOCK_REQUIRED => 'lock-required';
|
|
|
|
push @EXPORT, qw(CFGDEF_LOCK_REQUIRED);
|
|
|
|
|
2019-03-27 23:14:06 +02:00
|
|
|
# Does the command require a lock on the remote? The lock will only be acquired for process id 0.
|
|
|
|
use constant CFGDEF_LOCK_REMOTE_REQUIRED => 'lock-remote-required';
|
|
|
|
push @EXPORT, qw(CFGDEF_LOCK_REMOTE_REQUIRED);
|
|
|
|
|
2018-04-11 15:36:12 +02:00
|
|
|
# What type of lock is required?
|
|
|
|
use constant CFGDEF_LOCK_TYPE => 'lock-type';
|
|
|
|
push @EXPORT, qw(CFGDEF_LOCK_TYPE);
|
|
|
|
|
|
|
|
use constant CFGDEF_LOCK_TYPE_ARCHIVE => 'archive';
|
|
|
|
push @EXPORT, qw(CFGDEF_LOCK_TYPE_ARCHIVE);
|
|
|
|
use constant CFGDEF_LOCK_TYPE_BACKUP => 'backup';
|
|
|
|
push @EXPORT, qw(CFGDEF_LOCK_TYPE_BACKUP);
|
|
|
|
use constant CFGDEF_LOCK_TYPE_ALL => 'all';
|
|
|
|
push @EXPORT, qw(CFGDEF_LOCK_TYPE_ALL);
|
|
|
|
use constant CFGDEF_LOCK_TYPE_NONE => 'none';
|
|
|
|
push @EXPORT, qw(CFGDEF_LOCK_TYPE_NONE);
|
|
|
|
|
2019-03-09 11:03:47 +02:00
|
|
|
# Does the command allow parameters? If not then the config parser will automatically error out if parameters are detected. If so,
|
|
|
|
# then the command is responsible for ensuring that the parameters are valid.
|
|
|
|
use constant CFGDEF_PARAMETER_ALLOWED => 'parameter-allowed';
|
|
|
|
push @EXPORT, qw(CFGDEF_PARAMETER_ALLOWED);
|
|
|
|
|
2017-11-02 14:14:13 +02:00
|
|
|
# Option defines
|
2017-08-25 22:47:47 +02:00
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
2017-11-02 14:14:13 +02:00
|
|
|
use constant CFGDEF_ALLOW_LIST => 'allow-list';
|
|
|
|
push @EXPORT, qw(CFGDEF_ALLOW_LIST);
|
|
|
|
use constant CFGDEF_ALLOW_RANGE => 'allow-range';
|
|
|
|
push @EXPORT, qw(CFGDEF_ALLOW_RANGE);
|
|
|
|
use constant CFGDEF_DEFAULT => 'default';
|
|
|
|
push @EXPORT, qw(CFGDEF_DEFAULT);
|
|
|
|
use constant CFGDEF_DEPEND => 'depend';
|
|
|
|
push @EXPORT, qw(CFGDEF_DEPEND);
|
|
|
|
use constant CFGDEF_DEPEND_OPTION => 'depend-option';
|
|
|
|
push @EXPORT, qw(CFGDEF_DEPEND_OPTION);
|
|
|
|
use constant CFGDEF_DEPEND_LIST => 'depend-list';
|
|
|
|
push @EXPORT, qw(CFGDEF_DEPEND_LIST);
|
|
|
|
use constant CFGDEF_INDEX => 'index';
|
|
|
|
push @EXPORT, qw(CFGDEF_INDEX);
|
|
|
|
use constant CFGDEF_INDEX_TOTAL => 'indexTotal';
|
|
|
|
push @EXPORT, qw(CFGDEF_INDEX_TOTAL);
|
2018-02-04 01:27:38 +02:00
|
|
|
use constant CFGDEF_INHERIT => 'inherit';
|
|
|
|
push @EXPORT, qw(CFGDEF_INHERIT);
|
2017-12-05 21:46:52 +02:00
|
|
|
use constant CFGDEF_INTERNAL => 'internal';
|
|
|
|
push @EXPORT, qw(CFGDEF_INTERNAL);
|
2018-02-04 01:27:38 +02:00
|
|
|
use constant CFGDEF_NAME_ALT => 'name-alt';
|
|
|
|
push @EXPORT, qw(CFGDEF_NAME_ALT);
|
2017-11-02 14:14:13 +02:00
|
|
|
use constant CFGDEF_NEGATE => 'negate';
|
|
|
|
push @EXPORT, qw(CFGDEF_NEGATE);
|
|
|
|
use constant CFGDEF_PREFIX => 'prefix';
|
|
|
|
push @EXPORT, qw(CFGDEF_PREFIX);
|
|
|
|
use constant CFGDEF_COMMAND => 'command';
|
|
|
|
push @EXPORT, qw(CFGDEF_COMMAND);
|
|
|
|
use constant CFGDEF_REQUIRED => 'required';
|
|
|
|
push @EXPORT, qw(CFGDEF_REQUIRED);
|
2018-02-06 18:26:06 +02:00
|
|
|
use constant CFGDEF_RESET => 'reset';
|
|
|
|
push @EXPORT, qw(CFGDEF_RESET);
|
2017-11-02 14:14:13 +02:00
|
|
|
use constant CFGDEF_SECTION => 'section';
|
|
|
|
push @EXPORT, qw(CFGDEF_SECTION);
|
|
|
|
use constant CFGDEF_SECURE => 'secure';
|
|
|
|
push @EXPORT, qw(CFGDEF_SECURE);
|
|
|
|
use constant CFGDEF_TYPE => 'type';
|
|
|
|
push @EXPORT, qw(CFGDEF_TYPE);
|
|
|
|
|
|
|
|
# Option types
|
2017-08-25 22:47:47 +02:00
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
2017-11-02 14:14:13 +02:00
|
|
|
use constant CFGDEF_TYPE_BOOLEAN => 'boolean';
|
|
|
|
push @EXPORT, qw(CFGDEF_TYPE_BOOLEAN);
|
|
|
|
use constant CFGDEF_TYPE_FLOAT => 'float';
|
|
|
|
push @EXPORT, qw(CFGDEF_TYPE_FLOAT);
|
|
|
|
use constant CFGDEF_TYPE_HASH => 'hash';
|
|
|
|
push @EXPORT, qw(CFGDEF_TYPE_HASH);
|
|
|
|
use constant CFGDEF_TYPE_INTEGER => 'integer';
|
|
|
|
push @EXPORT, qw(CFGDEF_TYPE_INTEGER);
|
|
|
|
use constant CFGDEF_TYPE_LIST => 'list';
|
|
|
|
push @EXPORT, qw(CFGDEF_TYPE_LIST);
|
2019-03-14 11:48:33 +02:00
|
|
|
use constant CFGDEF_TYPE_PATH => 'path';
|
|
|
|
push @EXPORT, qw(CFGDEF_TYPE_PATH);
|
2017-11-02 14:14:13 +02:00
|
|
|
use constant CFGDEF_TYPE_STRING => 'string';
|
|
|
|
push @EXPORT, qw(CFGDEF_TYPE_STRING);
|
2018-04-25 21:46:05 +02:00
|
|
|
use constant CFGDEF_TYPE_SIZE => 'size';
|
|
|
|
push @EXPORT, qw(CFGDEF_TYPE_SIZE);
|
2017-08-25 22:47:47 +02:00
|
|
|
|
|
|
|
# Option config sections
|
|
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
2017-11-02 14:14:13 +02:00
|
|
|
use constant CFGDEF_SECTION_GLOBAL => 'global';
|
2017-08-25 22:47:47 +02:00
|
|
|
push @EXPORT, qw(CFGDEF_SECTION_GLOBAL);
|
2017-11-02 14:14:13 +02:00
|
|
|
use constant CFGDEF_SECTION_STANZA => 'stanza';
|
2017-08-25 22:47:47 +02:00
|
|
|
push @EXPORT, qw(CFGDEF_SECTION_STANZA);
|
|
|
|
|
2018-03-12 16:55:58 +02:00
|
|
|
####################################################################################################################################
|
|
|
|
# Command definition data
|
|
|
|
####################################################################################################################################
|
|
|
|
my $rhCommandDefine =
|
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_GET =>
|
|
|
|
{
|
|
|
|
&CFGDEF_LOG_FILE => false,
|
2018-04-30 23:27:39 +02:00
|
|
|
&CFGDEF_LOCK_TYPE => CFGDEF_LOCK_TYPE_ARCHIVE,
|
2019-03-09 11:03:47 +02:00
|
|
|
&CFGDEF_PARAMETER_ALLOWED => true,
|
2018-03-12 16:55:58 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
&CFGCMD_ARCHIVE_PUSH =>
|
|
|
|
{
|
|
|
|
&CFGDEF_LOG_FILE => false,
|
2019-03-27 23:14:06 +02:00
|
|
|
&CFGDEF_LOCK_REMOTE_REQUIRED => true,
|
2018-04-11 15:36:12 +02:00
|
|
|
&CFGDEF_LOCK_TYPE => CFGDEF_LOCK_TYPE_ARCHIVE,
|
2019-03-09 11:03:47 +02:00
|
|
|
&CFGDEF_PARAMETER_ALLOWED => true,
|
2018-03-12 16:55:58 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
&CFGCMD_BACKUP =>
|
|
|
|
{
|
2018-04-11 15:36:12 +02:00
|
|
|
&CFGDEF_LOCK_REQUIRED => true,
|
2019-03-27 23:14:06 +02:00
|
|
|
&CFGDEF_LOCK_REMOTE_REQUIRED => true,
|
2018-04-11 15:36:12 +02:00
|
|
|
&CFGDEF_LOCK_TYPE => CFGDEF_LOCK_TYPE_BACKUP,
|
2018-03-12 16:55:58 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
&CFGCMD_CHECK =>
|
|
|
|
{
|
|
|
|
&CFGDEF_LOG_FILE => false,
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGCMD_EXPIRE =>
|
|
|
|
{
|
2018-04-11 15:36:12 +02:00
|
|
|
&CFGDEF_LOCK_REQUIRED => true,
|
|
|
|
&CFGDEF_LOCK_TYPE => CFGDEF_LOCK_TYPE_BACKUP,
|
2018-03-12 16:55:58 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
&CFGCMD_HELP =>
|
|
|
|
{
|
|
|
|
&CFGDEF_LOG_FILE => false,
|
|
|
|
&CFGDEF_LOG_LEVEL_DEFAULT => DEBUG,
|
2019-03-09 11:03:47 +02:00
|
|
|
&CFGDEF_PARAMETER_ALLOWED => true,
|
2018-03-12 16:55:58 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
&CFGCMD_INFO =>
|
|
|
|
{
|
|
|
|
&CFGDEF_LOG_FILE => false,
|
|
|
|
&CFGDEF_LOG_LEVEL_DEFAULT => DEBUG,
|
|
|
|
},
|
|
|
|
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_CREATE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INTERNAL => true,
|
|
|
|
&CFGDEF_LOG_FILE => false,
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGCMD_REPO_GET =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INTERNAL => true,
|
|
|
|
&CFGDEF_LOG_FILE => false,
|
|
|
|
&CFGDEF_LOG_LEVEL_DEFAULT => DEBUG,
|
|
|
|
&CFGDEF_PARAMETER_ALLOWED => true,
|
|
|
|
},
|
|
|
|
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INTERNAL => true,
|
|
|
|
&CFGDEF_LOG_FILE => false,
|
|
|
|
&CFGDEF_LOG_LEVEL_DEFAULT => DEBUG,
|
|
|
|
&CFGDEF_PARAMETER_ALLOWED => true,
|
|
|
|
},
|
|
|
|
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_PUT =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INTERNAL => true,
|
|
|
|
&CFGDEF_LOG_FILE => false,
|
|
|
|
&CFGDEF_LOG_LEVEL_DEFAULT => DEBUG,
|
|
|
|
&CFGDEF_PARAMETER_ALLOWED => true,
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGCMD_REPO_RM =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INTERNAL => true,
|
|
|
|
&CFGDEF_LOG_FILE => false,
|
|
|
|
&CFGDEF_LOG_LEVEL_DEFAULT => DEBUG,
|
|
|
|
&CFGDEF_PARAMETER_ALLOWED => true,
|
|
|
|
},
|
|
|
|
|
2018-03-12 16:55:58 +02:00
|
|
|
&CFGCMD_RESTORE =>
|
|
|
|
{
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGCMD_STANZA_CREATE =>
|
|
|
|
{
|
2018-04-11 15:36:12 +02:00
|
|
|
&CFGDEF_LOCK_REQUIRED => true,
|
|
|
|
&CFGDEF_LOCK_TYPE => CFGDEF_LOCK_TYPE_ALL,
|
2018-03-12 16:55:58 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
&CFGCMD_STANZA_DELETE =>
|
|
|
|
{
|
2018-04-11 15:36:12 +02:00
|
|
|
&CFGDEF_LOCK_REQUIRED => true,
|
|
|
|
&CFGDEF_LOCK_TYPE => CFGDEF_LOCK_TYPE_ALL,
|
2018-03-12 16:55:58 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
&CFGCMD_STANZA_UPGRADE =>
|
|
|
|
{
|
2018-04-11 15:36:12 +02:00
|
|
|
&CFGDEF_LOCK_REQUIRED => true,
|
|
|
|
&CFGDEF_LOCK_TYPE => CFGDEF_LOCK_TYPE_ALL,
|
2018-03-12 16:55:58 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
&CFGCMD_START =>
|
|
|
|
{
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGCMD_STOP =>
|
|
|
|
{
|
|
|
|
},
|
|
|
|
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INTERNAL => true,
|
|
|
|
},
|
|
|
|
|
2018-03-12 16:55:58 +02:00
|
|
|
&CFGCMD_VERSION =>
|
|
|
|
{
|
|
|
|
&CFGDEF_LOG_FILE => false,
|
|
|
|
&CFGDEF_LOG_LEVEL_DEFAULT => DEBUG,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2017-08-25 22:47:47 +02:00
|
|
|
####################################################################################################################################
|
2017-11-02 14:14:13 +02:00
|
|
|
# Option definition data
|
2017-08-25 22:47:47 +02:00
|
|
|
####################################################################################################################################
|
2017-11-02 14:14:13 +02:00
|
|
|
my %hConfigDefine =
|
2017-08-25 22:47:47 +02:00
|
|
|
(
|
|
|
|
# Command-line only options
|
|
|
|
#-------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
&CFGOPT_CONFIG =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_DEFAULT => CFGDEF_DEFAULT_CONFIG,
|
|
|
|
&CFGDEF_NEGATE => true,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_EXPIRE => {},
|
|
|
|
&CFGCMD_INFO => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_CREATE => {},
|
|
|
|
&CFGCMD_REPO_GET => {},
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_PUT => {},
|
|
|
|
&CFGCMD_REPO_RM => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
2018-01-03 19:23:33 +02:00
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
|
|
|
&CFGCMD_START => {},
|
|
|
|
&CFGCMD_STOP => {},
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2018-04-19 17:09:39 +02:00
|
|
|
&CFGOPT_CONFIG_INCLUDE_PATH =>
|
|
|
|
{
|
2019-03-14 11:48:33 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_PATH,
|
2018-04-19 17:09:39 +02:00
|
|
|
&CFGDEF_INHERIT => CFGOPT_CONFIG,
|
|
|
|
&CFGDEF_DEFAULT => CFGDEF_DEFAULT_CONFIG_INCLUDE_PATH,
|
|
|
|
&CFGDEF_NEGATE => false,
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_CONFIG_PATH =>
|
|
|
|
{
|
2019-03-14 11:48:33 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_PATH,
|
2018-04-19 17:09:39 +02:00
|
|
|
&CFGDEF_INHERIT => CFGOPT_CONFIG,
|
|
|
|
&CFGDEF_DEFAULT => CFGDEF_DEFAULT_CONFIG_PATH,
|
|
|
|
&CFGDEF_NEGATE => false,
|
|
|
|
},
|
|
|
|
|
2020-03-16 19:56:52 +02:00
|
|
|
&CFGOPT_DRYRUN =>
|
|
|
|
{
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_DEFAULT => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
|
|
|
&CFGCMD_EXPIRE => {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGOPT_FORCE =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_BACKUP =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEFAULT => false,
|
|
|
|
&CFGDEF_DEPEND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_ONLINE,
|
|
|
|
&CFGDEF_DEPEND_LIST => [false],
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGCMD_RESTORE =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEFAULT => false,
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
&CFGCMD_STANZA_CREATE =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEFAULT => false,
|
2019-11-19 22:56:13 +02:00
|
|
|
&CFGDEF_INTERNAL => true,
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
|
2018-01-03 19:23:33 +02:00
|
|
|
&CFGCMD_STANZA_DELETE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_DEFAULT => false,
|
|
|
|
},
|
|
|
|
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_STOP =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEFAULT => false
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_ONLINE =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_NEGATE => true,
|
|
|
|
&CFGDEF_DEFAULT => true,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_SET =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2020-04-27 20:00:36 +02:00
|
|
|
&CFGCMD_EXPIRE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
},
|
2019-09-30 18:39:38 +02:00
|
|
|
&CFGCMD_INFO =>
|
|
|
|
{
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_DEPEND =>
|
|
|
|
{
|
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_STANZA,
|
|
|
|
},
|
|
|
|
},
|
2020-03-26 19:04:59 +02:00
|
|
|
&CFGCMD_RESTORE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_DEFAULT => 'latest',
|
|
|
|
},
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY =>
|
|
|
|
{
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_INTERNAL => true,
|
|
|
|
},
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_STANZA =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_EXPIRE => {},
|
|
|
|
&CFGCMD_INFO =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_REQUIRED => false
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_CREATE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_REQUIRED => false
|
|
|
|
},
|
|
|
|
&CFGCMD_REPO_GET =>
|
|
|
|
{
|
|
|
|
&CFGDEF_REQUIRED => false
|
|
|
|
},
|
|
|
|
&CFGCMD_REPO_LS =>
|
|
|
|
{
|
|
|
|
&CFGDEF_REQUIRED => false
|
|
|
|
},
|
|
|
|
&CFGCMD_REPO_PUT =>
|
|
|
|
{
|
|
|
|
&CFGDEF_REQUIRED => false
|
|
|
|
},
|
|
|
|
&CFGCMD_REPO_RM =>
|
|
|
|
{
|
|
|
|
&CFGDEF_REQUIRED => false
|
|
|
|
},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
2018-01-03 19:23:33 +02:00
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
|
|
|
&CFGCMD_START =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_REQUIRED => false
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
&CFGCMD_STOP =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_REQUIRED => false
|
2020-09-22 17:57:38 +02:00
|
|
|
},
|
|
|
|
&CFGCMD_VERIFY => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_TARGET =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_RESTORE =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEPEND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_TYPE,
|
|
|
|
&CFGDEF_DEPEND_LIST =>
|
2017-08-25 22:47:47 +02:00
|
|
|
[
|
|
|
|
&CFGOPTVAL_RESTORE_TYPE_NAME,
|
|
|
|
&CFGOPTVAL_RESTORE_TYPE_TIME,
|
|
|
|
&CFGOPTVAL_RESTORE_TYPE_XID,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_TARGET_EXCLUSIVE =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_RESTORE =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEFAULT => false,
|
|
|
|
&CFGDEF_DEPEND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_TYPE,
|
|
|
|
&CFGDEF_DEPEND_LIST =>
|
2017-08-25 22:47:47 +02:00
|
|
|
[
|
|
|
|
&CFGOPTVAL_RESTORE_TYPE_TIME,
|
|
|
|
&CFGOPTVAL_RESTORE_TYPE_XID,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_TARGET_ACTION =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_RESTORE =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEFAULT => CFGOPTVAL_RESTORE_TARGET_ACTION_PAUSE,
|
2017-08-25 22:47:47 +02:00
|
|
|
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_ALLOW_LIST =>
|
2017-08-25 22:47:47 +02:00
|
|
|
[
|
|
|
|
&CFGOPTVAL_RESTORE_TARGET_ACTION_PAUSE,
|
|
|
|
&CFGOPTVAL_RESTORE_TARGET_ACTION_PROMOTE,
|
|
|
|
&CFGOPTVAL_RESTORE_TARGET_ACTION_SHUTDOWN,
|
|
|
|
],
|
|
|
|
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEPEND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_TYPE,
|
|
|
|
&CFGDEF_DEPEND_LIST =>
|
2017-08-25 22:47:47 +02:00
|
|
|
[
|
2018-03-07 00:12:16 +02:00
|
|
|
&CFGOPTVAL_RESTORE_TYPE_IMMEDIATE,
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGOPTVAL_RESTORE_TYPE_NAME,
|
|
|
|
&CFGOPTVAL_RESTORE_TYPE_TIME,
|
|
|
|
&CFGOPTVAL_RESTORE_TYPE_XID,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_TARGET_TIMELINE =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_RESTORE =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_DEPEND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_TYPE,
|
|
|
|
&CFGDEF_DEPEND_LIST =>
|
2017-08-25 22:47:47 +02:00
|
|
|
[
|
|
|
|
&CFGOPTVAL_RESTORE_TYPE_DEFAULT,
|
|
|
|
&CFGOPTVAL_RESTORE_TYPE_NAME,
|
2019-09-26 23:39:45 +02:00
|
|
|
&CFGOPTVAL_RESTORE_TYPE_STANDBY,
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGOPTVAL_RESTORE_TYPE_TIME,
|
|
|
|
&CFGOPTVAL_RESTORE_TYPE_XID,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_TYPE =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_BACKUP =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEFAULT => CFGOPTVAL_BACKUP_TYPE_INCR,
|
|
|
|
&CFGDEF_ALLOW_LIST =>
|
2017-08-25 22:47:47 +02:00
|
|
|
[
|
|
|
|
&CFGOPTVAL_BACKUP_TYPE_FULL,
|
|
|
|
&CFGOPTVAL_BACKUP_TYPE_DIFF,
|
|
|
|
&CFGOPTVAL_BACKUP_TYPE_INCR,
|
|
|
|
]
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGCMD_RESTORE =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEFAULT => CFGOPTVAL_RESTORE_TYPE_DEFAULT,
|
|
|
|
&CFGDEF_ALLOW_LIST =>
|
2017-08-25 22:47:47 +02:00
|
|
|
[
|
|
|
|
&CFGOPTVAL_RESTORE_TYPE_NAME,
|
|
|
|
&CFGOPTVAL_RESTORE_TYPE_TIME,
|
|
|
|
&CFGOPTVAL_RESTORE_TYPE_XID,
|
|
|
|
&CFGOPTVAL_RESTORE_TYPE_PRESERVE,
|
|
|
|
&CFGOPTVAL_RESTORE_TYPE_NONE,
|
|
|
|
&CFGOPTVAL_RESTORE_TYPE_IMMEDIATE,
|
|
|
|
&CFGOPTVAL_RESTORE_TYPE_DEFAULT,
|
2019-09-26 23:39:45 +02:00
|
|
|
&CFGOPTVAL_RESTORE_TYPE_STANDBY,
|
2017-08-25 22:47:47 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_OUTPUT =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_INFO =>
|
|
|
|
{
|
2019-09-12 22:29:50 +02:00
|
|
|
&CFGDEF_DEFAULT => CFGOPTVAL_OUTPUT_TEXT,
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_ALLOW_LIST =>
|
2017-08-25 22:47:47 +02:00
|
|
|
[
|
2019-09-12 22:29:50 +02:00
|
|
|
&CFGOPTVAL_OUTPUT_TEXT,
|
|
|
|
&CFGOPTVAL_OUTPUT_JSON,
|
|
|
|
]
|
|
|
|
},
|
|
|
|
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS =>
|
2019-09-12 22:29:50 +02:00
|
|
|
{
|
|
|
|
&CFGDEF_DEFAULT => CFGOPTVAL_OUTPUT_TEXT,
|
|
|
|
&CFGDEF_ALLOW_LIST =>
|
|
|
|
[
|
|
|
|
&CFGOPTVAL_OUTPUT_TEXT,
|
|
|
|
&CFGOPTVAL_OUTPUT_JSON,
|
2017-08-25 22:47:47 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
# Command-line only local/remote options
|
|
|
|
#-------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
&CFGOPT_HOST_ID =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_INTEGER,
|
2020-01-15 21:24:58 +02:00
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_INTERNAL => true,
|
2018-02-09 22:42:11 +02:00
|
|
|
&CFGDEF_ALLOW_RANGE => [1, CFGDEF_INDEX_PG > CFGDEF_INDEX_REPO ? CFGDEF_INDEX_PG : CFGDEF_INDEX_REPO],
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2020-01-15 21:24:58 +02:00
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_RESTORE => {},
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_PROCESS =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_INTEGER,
|
2020-01-15 21:24:58 +02:00
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_INTERNAL => true,
|
2018-02-09 22:42:11 +02:00
|
|
|
&CFGDEF_ALLOW_RANGE => [0, 1024],
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2020-01-15 21:24:58 +02:00
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_INFO => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_CREATE => {},
|
|
|
|
&CFGCMD_REPO_GET => {},
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_PUT => {},
|
|
|
|
&CFGCMD_REPO_RM => {},
|
2020-01-15 21:24:58 +02:00
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2020-01-09 03:59:02 +02:00
|
|
|
&CFGOPT_REMOTE_TYPE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_INTERNAL => true,
|
|
|
|
&CFGDEF_ALLOW_LIST =>
|
|
|
|
[
|
|
|
|
&CFGOPTVAL_STORAGE_TYPE_PG,
|
|
|
|
&CFGOPTVAL_STORAGE_TYPE_REPO,
|
|
|
|
],
|
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
2020-01-15 21:24:58 +02:00
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_INFO => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_CREATE => {},
|
|
|
|
&CFGCMD_REPO_GET => {},
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_PUT => {},
|
|
|
|
&CFGCMD_REPO_RM => {},
|
2020-01-15 21:24:58 +02:00
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY => {},
|
2020-01-15 21:24:58 +02:00
|
|
|
},
|
2020-01-09 03:59:02 +02:00
|
|
|
},
|
|
|
|
|
2019-05-28 16:03:48 +02:00
|
|
|
# Command-line only storage options
|
|
|
|
#-------------------------------------------------------------------------------------------------------------------------------
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGOPT_CIPHER_PASS =>
|
|
|
|
{
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_INTERNAL => true,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
|
|
|
&CFGCMD_REPO_GET => {},
|
|
|
|
&CFGCMD_REPO_PUT => {},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2019-05-28 16:03:48 +02:00
|
|
|
&CFGOPT_FILTER =>
|
|
|
|
{
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2019-05-28 16:03:48 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGOPT_IGNORE_MISSING =>
|
|
|
|
{
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_DEFAULT => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
|
|
|
&CFGCMD_REPO_GET => {},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_RAW =>
|
|
|
|
{
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_DEFAULT => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
|
|
|
&CFGCMD_REPO_GET => {},
|
|
|
|
&CFGCMD_REPO_PUT => {},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2019-09-12 22:29:50 +02:00
|
|
|
&CFGOPT_RECURSE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_DEFAULT => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_RM => {},
|
2019-09-12 22:29:50 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2019-05-28 16:03:48 +02:00
|
|
|
&CFGOPT_SORT =>
|
|
|
|
{
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_DEFAULT => 'asc',
|
|
|
|
&CFGDEF_ALLOW_LIST =>
|
|
|
|
[
|
2019-09-12 22:29:50 +02:00
|
|
|
'none',
|
2019-05-28 16:03:48 +02:00
|
|
|
'asc',
|
|
|
|
'desc',
|
|
|
|
],
|
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2019-05-28 16:03:48 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2017-08-25 22:47:47 +02:00
|
|
|
# General options
|
|
|
|
#-------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
&CFGOPT_ARCHIVE_TIMEOUT =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_FLOAT,
|
|
|
|
&CFGDEF_DEFAULT => 60,
|
|
|
|
&CFGDEF_ALLOW_RANGE => [WAIT_TIME_MINIMUM, 86400],
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2018-04-30 23:27:39 +02:00
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_BUFFER_SIZE =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
2018-04-25 21:46:05 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_SIZE,
|
Reduce buffer-size default to 1MiB.
The prior default was determined by benchmarking the Perl code prior to the 1.0 release. In general buffer allocation was more expensive in Perl so large buffers gave the best performance. This was due to multiple buffer allocations for each filter in an IO operation.
The C code allocates fixed buffers for each IO operation so the cost for buffer allocation is lower than Perl. That being the case it made sense to benchmark the C code to determine the optimal buffer default.
The performance/storage tests were used to measure the performance of a variety of filters. 1GiB of data was processed by each filter 10 times and the results of the tests were averaged.
While most buffer sizes gave similar performance, 1MiB appeared to perform the best overall. Of course, different architectures are likely to yield different results but this seems like a sensible default. The buffer-size option may still need to be manually configured to give optimal results.
Raw test data for reference:
4MB buffer (prior default)
copy time 1807ms, avg time 180ms, avg throughput: 5942MB/s
md5 time 14200ms, avg time 1420ms, avg throughput: 756MB/s
sha1 time 11431ms, avg time 1143ms, avg throughput: 939MB/s
sha256 time 23463ms, avg time 2346ms, avg throughput: 457MB/s
gzip -6 time 381199ms, avg time 38119ms, avg throughput: 28MB/s
lz4 -1 time 15484ms, avg time 1548ms, avg throughput: 693MB/s
1MB buffer (new default)
copy time 1760ms, avg time 176ms, avg throughput: 6100MB/s
md5 time 13739ms, avg time 1373ms, avg throughput: 781MB/s
sha1 time 11025ms, avg time 1102ms, avg throughput: 973MB/s
sha256 time 22539ms, avg time 2253ms, avg throughput: 476MB/s
gzip -6 time 372995ms, avg time 37299ms, avg throughput: 28MB/s
lz4 -1 time 15118ms, avg time 1511ms, avg throughput: 710MB/s
512K buffer
copy time 1782ms, avg time 178ms, avg throughput: 6025MB/s
md5 time 13724ms, avg time 1372ms, avg throughput: 782MB/s
sha1 time 10959ms, avg time 1095ms, avg throughput: 979MB/s
sha256 time 22982ms, avg time 2298ms, avg throughput: 467MB/s
gzip -6 time 378120ms, avg time 37812ms, avg throughput: 28MB/s
lz4 -1 time 15484ms, avg time 1548ms, avg throughput: 693MB/s
256K buffer
copy time 1805ms, avg time 180ms, avg throughput: 5948MB/s
md5 time 13706ms, avg time 1370ms, avg throughput: 783MB/s
sha1 time 11074ms, avg time 1107ms, avg throughput: 969MB/s
sha256 time 22588ms, avg time 2258ms, avg throughput: 475MB/s
gzip -6 time 372645ms, avg time 37264ms, avg throughput: 28MB/s
lz4 -1 time 16346ms, avg time 1634ms, avg throughput: 656MB/s
2020-05-19 22:58:49 +02:00
|
|
|
&CFGDEF_DEFAULT => 1048576,
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_ALLOW_LIST =>
|
2017-08-25 22:47:47 +02:00
|
|
|
[
|
|
|
|
&CFGDEF_DEFAULT_BUFFER_SIZE_MIN,
|
|
|
|
&CFGDEF_DEFAULT_BUFFER_SIZE_MIN * 2,
|
|
|
|
&CFGDEF_DEFAULT_BUFFER_SIZE_MIN * 4,
|
|
|
|
&CFGDEF_DEFAULT_BUFFER_SIZE_MIN * 8,
|
|
|
|
&CFGDEF_DEFAULT_BUFFER_SIZE_MIN * 16,
|
|
|
|
&CFGDEF_DEFAULT_BUFFER_SIZE_MIN * 32,
|
|
|
|
&CFGDEF_DEFAULT_BUFFER_SIZE_MIN * 64,
|
|
|
|
&CFGDEF_DEFAULT_BUFFER_SIZE_MIN * 128,
|
|
|
|
&CFGDEF_DEFAULT_BUFFER_SIZE_MIN * 256,
|
|
|
|
&CFGDEF_DEFAULT_BUFFER_SIZE_MIN * 512,
|
|
|
|
&CFGDEF_DEFAULT_BUFFER_SIZE_MIN * 1024,
|
|
|
|
],
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_EXPIRE => {},
|
|
|
|
&CFGCMD_INFO => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_CREATE => {},
|
|
|
|
&CFGCMD_REPO_GET => {},
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_PUT => {},
|
|
|
|
&CFGCMD_REPO_RM => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
2018-01-03 19:23:33 +02:00
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2020-04-17 15:55:40 +02:00
|
|
|
&CFGOPT_SCK_BLOCK =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_INTERNAL => true,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_DEFAULT => false,
|
|
|
|
&CFGDEF_COMMAND => CFGOPT_BUFFER_SIZE,
|
|
|
|
},
|
|
|
|
|
2020-04-01 21:44:51 +02:00
|
|
|
&CFGOPT_SCK_KEEP_ALIVE =>
|
2020-04-01 00:13:11 +02:00
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_DEFAULT => true,
|
|
|
|
&CFGDEF_COMMAND => CFGOPT_BUFFER_SIZE,
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_TCP_KEEP_ALIVE_COUNT =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_INTEGER,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_COMMAND => CFGOPT_BUFFER_SIZE,
|
|
|
|
&CFGDEF_ALLOW_RANGE => [1, 32],
|
|
|
|
&CFGDEF_DEPEND =>
|
|
|
|
{
|
2020-04-01 21:44:51 +02:00
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_SCK_KEEP_ALIVE,
|
2020-04-01 00:13:11 +02:00
|
|
|
&CFGDEF_DEPEND_LIST => [true],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_TCP_KEEP_ALIVE_IDLE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_INTEGER,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_COMMAND => CFGOPT_BUFFER_SIZE,
|
|
|
|
&CFGDEF_ALLOW_RANGE => [1, 3600],
|
|
|
|
&CFGDEF_DEPEND => CFGOPT_TCP_KEEP_ALIVE_COUNT,
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_TCP_KEEP_ALIVE_INTERVAL =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_INTEGER,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_COMMAND => CFGOPT_BUFFER_SIZE,
|
|
|
|
&CFGDEF_ALLOW_RANGE => [1, 900],
|
|
|
|
&CFGDEF_DEPEND => CFGOPT_TCP_KEEP_ALIVE_COUNT,
|
|
|
|
},
|
|
|
|
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGOPT_DB_TIMEOUT =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_FLOAT,
|
|
|
|
&CFGDEF_DEFAULT => CFGDEF_DEFAULT_DB_TIMEOUT,
|
|
|
|
&CFGDEF_ALLOW_RANGE => [CFGDEF_DEFAULT_DB_TIMEOUT_MIN, CFGDEF_DEFAULT_DB_TIMEOUT_MAX],
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_CREATE => {},
|
|
|
|
&CFGCMD_REPO_GET => {},
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_PUT => {},
|
|
|
|
&CFGCMD_REPO_RM => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
2018-01-03 19:23:33 +02:00
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2018-09-18 19:29:05 +02:00
|
|
|
&CFGOPT_DELTA =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
2018-09-19 17:12:45 +02:00
|
|
|
&CFGDEF_DEFAULT => false,
|
2018-09-18 19:29:05 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
2018-09-19 17:12:45 +02:00
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
},
|
2018-09-18 19:29:05 +02:00
|
|
|
},
|
|
|
|
|
2020-03-06 21:41:03 +02:00
|
|
|
# Option is deprecated and should not be referenced outside of cfgLoadUpdateOption().
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGOPT_COMPRESS =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_DEFAULT => true,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2020-03-06 21:41:03 +02:00
|
|
|
&CFGOPT_COMPRESS_TYPE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_DEFAULT => 'gz',
|
|
|
|
&CFGDEF_ALLOW_LIST =>
|
|
|
|
[
|
|
|
|
'none',
|
2020-05-05 22:49:01 +02:00
|
|
|
'bz2',
|
2020-03-06 21:41:03 +02:00
|
|
|
'gz',
|
2020-03-10 20:45:27 +02:00
|
|
|
'lz4',
|
2020-05-04 21:25:27 +02:00
|
|
|
'zst',
|
2020-03-06 21:41:03 +02:00
|
|
|
],
|
|
|
|
&CFGDEF_COMMAND => CFGOPT_COMPRESS,
|
|
|
|
},
|
|
|
|
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGOPT_COMPRESS_LEVEL =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_INTEGER,
|
2020-03-06 21:41:03 +02:00
|
|
|
&CFGDEF_REQUIRED => false,
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_ALLOW_RANGE => [CFGDEF_DEFAULT_COMPRESS_LEVEL_MIN, CFGDEF_DEFAULT_COMPRESS_LEVEL_MAX],
|
2020-02-27 19:25:32 +02:00
|
|
|
&CFGDEF_COMMAND => CFGOPT_COMPRESS,
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_COMPRESS_LEVEL_NETWORK =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_INTEGER,
|
|
|
|
&CFGDEF_DEFAULT => 3,
|
|
|
|
&CFGDEF_ALLOW_RANGE => [CFGDEF_DEFAULT_COMPRESS_LEVEL_MIN, CFGDEF_DEFAULT_COMPRESS_LEVEL_MAX],
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_INFO => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_GET => {},
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_PUT => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
2018-01-03 19:23:33 +02:00
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_NEUTRAL_UMASK =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_DEFAULT => true,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_EXPIRE => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_CREATE => {},
|
|
|
|
&CFGCMD_REPO_GET => {},
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_PUT => {},
|
|
|
|
&CFGCMD_REPO_RM => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
2018-01-03 19:23:33 +02:00
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
|
|
|
&CFGCMD_START => {},
|
|
|
|
&CFGCMD_STOP => {},
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_CMD_SSH =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_DEFAULT => 'ssh',
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_EXPIRE => {},
|
|
|
|
&CFGCMD_INFO => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_CREATE => {},
|
|
|
|
&CFGCMD_REPO_GET => {},
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_PUT => {},
|
|
|
|
&CFGCMD_REPO_RM => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
2018-01-03 19:23:33 +02:00
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
|
|
|
&CFGCMD_START => {},
|
|
|
|
&CFGCMD_STOP => {},
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2020-04-17 15:18:52 +02:00
|
|
|
&CFGOPT_IO_TIMEOUT =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_FLOAT,
|
|
|
|
&CFGDEF_DEFAULT => 60,
|
|
|
|
&CFGDEF_ALLOW_RANGE => [.1, 3600],
|
2020-04-20 15:45:08 +02:00
|
|
|
&CFGDEF_COMMAND => CFGOPT_BUFFER_SIZE,
|
2020-04-17 15:18:52 +02:00
|
|
|
},
|
|
|
|
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGOPT_LOCK_PATH =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
2019-03-14 11:48:33 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_PATH,
|
2018-11-25 02:05:03 +02:00
|
|
|
&CFGDEF_DEFAULT => '/tmp/' . PROJECT_EXE,
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_EXPIRE => {},
|
|
|
|
&CFGCMD_INFO => {},
|
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
2018-01-03 19:23:33 +02:00
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
|
|
|
&CFGCMD_START => {},
|
|
|
|
&CFGCMD_STOP => {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_LOG_PATH =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
2019-03-14 11:48:33 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_PATH,
|
2018-11-25 02:05:03 +02:00
|
|
|
&CFGDEF_DEFAULT => '/var/log/' . PROJECT_EXE,
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
2017-12-23 06:27:49 +02:00
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_EXPIRE => {},
|
|
|
|
&CFGCMD_INFO => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_CREATE => {},
|
|
|
|
&CFGCMD_REPO_GET => {},
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_PUT => {},
|
|
|
|
&CFGCMD_REPO_RM => {},
|
2017-12-23 06:27:49 +02:00
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
2018-01-03 19:23:33 +02:00
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
2017-12-23 06:27:49 +02:00
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
|
|
|
&CFGCMD_START => {},
|
|
|
|
&CFGCMD_STOP => {},
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY => {},
|
2017-12-23 06:27:49 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGOPT_PROTOCOL_TIMEOUT =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_FLOAT,
|
|
|
|
&CFGDEF_DEFAULT => CFGDEF_DEFAULT_DB_TIMEOUT + 30,
|
|
|
|
&CFGDEF_ALLOW_RANGE => [CFGDEF_DEFAULT_DB_TIMEOUT_MIN, CFGDEF_DEFAULT_DB_TIMEOUT_MAX],
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_INFO => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_CREATE => {},
|
|
|
|
&CFGCMD_REPO_GET => {},
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_PUT => {},
|
|
|
|
&CFGCMD_REPO_RM => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
2018-01-03 19:23:33 +02:00
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2018-02-04 01:27:38 +02:00
|
|
|
# Repository options
|
|
|
|
#-------------------------------------------------------------------------------------------------------------------------------
|
2017-11-06 19:51:12 +02:00
|
|
|
&CFGOPT_REPO_CIPHER_PASS =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
2017-11-06 19:51:12 +02:00
|
|
|
&CFGDEF_SECURE => true,
|
2019-06-05 17:43:17 +02:00
|
|
|
&CFGDEF_REQUIRED => true,
|
2017-11-06 19:51:12 +02:00
|
|
|
&CFGDEF_DEPEND =>
|
|
|
|
{
|
2018-11-21 02:24:53 +02:00
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_REPO_CIPHER_TYPE,
|
2017-11-06 19:51:12 +02:00
|
|
|
&CFGDEF_DEPEND_LIST => [CFGOPTVAL_REPO_CIPHER_TYPE_AES_256_CBC],
|
|
|
|
},
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'repo-cipher-pass' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
2017-11-06 19:51:12 +02:00
|
|
|
&CFGDEF_COMMAND => CFGOPT_REPO_TYPE,
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_REPO_CIPHER_TYPE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
2017-11-06 19:51:12 +02:00
|
|
|
&CFGDEF_DEFAULT => CFGOPTVAL_REPO_CIPHER_TYPE_NONE,
|
|
|
|
&CFGDEF_ALLOW_LIST =>
|
|
|
|
[
|
|
|
|
&CFGOPTVAL_REPO_CIPHER_TYPE_NONE,
|
|
|
|
&CFGOPTVAL_REPO_CIPHER_TYPE_AES_256_CBC,
|
|
|
|
],
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'repo-cipher-type' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
2017-11-06 19:51:12 +02:00
|
|
|
&CFGDEF_COMMAND => CFGOPT_REPO_TYPE,
|
|
|
|
},
|
|
|
|
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGOPT_REPO_HARDLINK =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-19 17:12:51 +02:00
|
|
|
'hardlink' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
|
|
|
&CFGDEF_DEFAULT => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2020-05-22 19:51:26 +02:00
|
|
|
&CFGOPT_REPO_LOCAL =>
|
2018-02-04 01:27:38 +02:00
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
2020-05-22 19:51:26 +02:00
|
|
|
&CFGDEF_INTERNAL => true,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
2020-05-22 19:51:26 +02:00
|
|
|
&CFGDEF_DEFAULT => false,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INTERNAL => true,
|
|
|
|
},
|
|
|
|
&CFGCMD_CHECK => {},
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGCMD_EXPIRE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INTERNAL => true,
|
|
|
|
},
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGCMD_INFO => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_CREATE => {},
|
|
|
|
&CFGCMD_REPO_GET => {},
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_PUT => {},
|
|
|
|
&CFGCMD_REPO_RM => {},
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGCMD_RESTORE => {},
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGCMD_STANZA_CREATE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INTERNAL => true,
|
|
|
|
},
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGCMD_STANZA_DELETE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INTERNAL => true,
|
|
|
|
},
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGCMD_STANZA_UPGRADE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INTERNAL => true,
|
|
|
|
},
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGCMD_START => {},
|
|
|
|
&CFGCMD_STOP => {},
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY => {},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2020-05-22 19:51:26 +02:00
|
|
|
&CFGOPT_REPO_HOST =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
|
|
|
'backup-host' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
|
|
|
},
|
|
|
|
&CFGDEF_COMMAND => CFGOPT_REPO_LOCAL,
|
|
|
|
&CFGDEF_DEPEND =>
|
|
|
|
{
|
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_REPO_LOCAL,
|
|
|
|
&CFGDEF_DEPEND_LIST => [false],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGOPT_REPO_HOST_CMD =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'backup-cmd' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_INFO => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_CREATE => {},
|
|
|
|
&CFGCMD_REPO_GET => {},
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_PUT => {},
|
|
|
|
&CFGCMD_REPO_RM => {},
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
&CFGCMD_START => {},
|
|
|
|
&CFGCMD_STOP => {},
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY => {},
|
2018-02-05 18:50:09 +02:00
|
|
|
},
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_DEPEND =>
|
|
|
|
{
|
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_REPO_HOST
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_REPO_HOST_CONFIG =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
|
|
|
&CFGDEF_DEFAULT => CFGDEF_DEFAULT_CONFIG,
|
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'backup-config' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGDEF_COMMAND => CFGOPT_REPO_HOST_CMD,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_DEPEND =>
|
|
|
|
{
|
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_REPO_HOST
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2018-04-19 17:09:39 +02:00
|
|
|
&CFGOPT_REPO_HOST_CONFIG_PATH =>
|
|
|
|
{
|
2019-03-14 11:48:33 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_PATH,
|
2018-04-19 17:09:39 +02:00
|
|
|
&CFGDEF_INHERIT => CFGOPT_REPO_HOST_CONFIG,
|
|
|
|
&CFGDEF_DEFAULT => CFGDEF_DEFAULT_CONFIG_PATH,
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_REPO_HOST_CONFIG_INCLUDE_PATH =>
|
|
|
|
{
|
2019-03-14 11:48:33 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_PATH,
|
2018-04-19 17:09:39 +02:00
|
|
|
&CFGDEF_INHERIT => CFGOPT_REPO_HOST_CONFIG,
|
|
|
|
&CFGDEF_DEFAULT => CFGDEF_DEFAULT_CONFIG_INCLUDE_PATH,
|
|
|
|
},
|
|
|
|
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGOPT_REPO_HOST_PORT =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_INTEGER,
|
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
2018-02-09 22:42:11 +02:00
|
|
|
&CFGDEF_ALLOW_RANGE => [CFGDEF_DEFAULT_PROTOCOL_PORT_MIN, CFGDEF_DEFAULT_PROTOCOL_PORT_MAX],
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'backup-ssh-port' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGDEF_COMMAND => CFGOPT_REPO_HOST_CMD,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_DEPEND =>
|
|
|
|
{
|
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_REPO_HOST
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_REPO_HOST_USER =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
2018-11-25 02:05:03 +02:00
|
|
|
&CFGDEF_DEFAULT => PROJECT_EXE,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'backup-user' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGDEF_COMMAND => CFGOPT_REPO_HOST_CMD,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_DEPEND =>
|
|
|
|
{
|
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_REPO_HOST
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGOPT_REPO_PATH =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
2019-03-14 11:48:33 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_PATH,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
2018-11-25 02:05:03 +02:00
|
|
|
&CFGDEF_DEFAULT => '/var/lib/' . PROJECT_EXE,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'repo-path' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGDEF_COMMAND => CFGOPT_REPO_TYPE,
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
|
2018-02-19 22:07:24 +02:00
|
|
|
&CFGOPT_REPO_RETENTION_ARCHIVE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_INTEGER,
|
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_ALLOW_RANGE => [CFGDEF_DEFAULT_RETENTION_MIN, CFGDEF_DEFAULT_RETENTION_MAX],
|
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
|
|
|
'retention-archive' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
|
|
|
},
|
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_EXPIRE => {},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_REPO_RETENTION_ARCHIVE_TYPE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
|
|
|
&CFGDEF_DEFAULT => CFGOPTVAL_BACKUP_TYPE_FULL,
|
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_EXPIRE => {},
|
|
|
|
},
|
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
|
|
|
'retention-archive-type' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
|
|
|
},
|
|
|
|
&CFGDEF_ALLOW_LIST =>
|
|
|
|
[
|
|
|
|
&CFGOPTVAL_BACKUP_TYPE_FULL,
|
|
|
|
&CFGOPTVAL_BACKUP_TYPE_DIFF,
|
|
|
|
&CFGOPTVAL_BACKUP_TYPE_INCR,
|
|
|
|
]
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_REPO_RETENTION_DIFF =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_INTEGER,
|
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_ALLOW_RANGE => [CFGDEF_DEFAULT_RETENTION_MIN, CFGDEF_DEFAULT_RETENTION_MAX],
|
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
|
|
|
'retention-diff' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
|
|
|
},
|
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_EXPIRE => {},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_REPO_RETENTION_FULL =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_INTEGER,
|
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_ALLOW_RANGE => [CFGDEF_DEFAULT_RETENTION_MIN, CFGDEF_DEFAULT_RETENTION_MAX],
|
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
|
|
|
'retention-full' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
|
|
|
},
|
2020-05-08 21:25:03 +02:00
|
|
|
&CFGDEF_COMMAND => CFGOPT_REPO_RETENTION_FULL_TYPE,
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_REPO_RETENTION_FULL_TYPE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
|
|
|
&CFGDEF_DEFAULT => 'count',
|
|
|
|
&CFGDEF_ALLOW_LIST =>
|
|
|
|
[
|
|
|
|
'count',
|
|
|
|
'time',
|
|
|
|
],
|
2018-02-19 22:07:24 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_EXPIRE => {},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2020-07-02 22:24:34 +02:00
|
|
|
&CFGOPT_REPO_AZURE_ACCOUNT =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
|
|
|
&CFGDEF_SECURE => true,
|
|
|
|
&CFGDEF_REQUIRED => true,
|
|
|
|
&CFGDEF_DEPEND =>
|
|
|
|
{
|
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_REPO_TYPE,
|
|
|
|
&CFGDEF_DEPEND_LIST => [CFGOPTVAL_REPO_TYPE_AZURE],
|
|
|
|
},
|
|
|
|
&CFGDEF_COMMAND => CFGOPT_REPO_TYPE,
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_REPO_AZURE_CA_FILE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INHERIT => CFGOPT_REPO_AZURE_HOST,
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_REPO_AZURE_CA_PATH =>
|
|
|
|
{
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_PATH,
|
|
|
|
&CFGDEF_INHERIT => CFGOPT_REPO_AZURE_HOST,
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_REPO_AZURE_CONTAINER =>
|
|
|
|
{
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_DEPEND => CFGOPT_REPO_AZURE_ACCOUNT,
|
|
|
|
&CFGDEF_COMMAND => CFGOPT_REPO_TYPE,
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_REPO_AZURE_HOST =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_DEPEND => CFGOPT_REPO_AZURE_ACCOUNT,
|
|
|
|
&CFGDEF_COMMAND => CFGOPT_REPO_TYPE,
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_REPO_AZURE_KEY =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INHERIT => CFGOPT_REPO_AZURE_ACCOUNT,
|
|
|
|
},
|
|
|
|
|
2020-07-09 20:46:48 +02:00
|
|
|
&CFGOPT_REPO_AZURE_KEY_TYPE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INHERIT => CFGOPT_REPO_AZURE_CONTAINER,
|
|
|
|
&CFGDEF_DEFAULT => 'shared',
|
|
|
|
&CFGDEF_ALLOW_LIST =>
|
|
|
|
[
|
|
|
|
'shared',
|
|
|
|
'sas',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
2020-07-02 22:24:34 +02:00
|
|
|
&CFGOPT_REPO_AZURE_PORT =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_INTEGER,
|
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
|
|
|
&CFGDEF_DEFAULT => 443,
|
|
|
|
&CFGDEF_ALLOW_RANGE => [1, 65535],
|
|
|
|
&CFGDEF_DEPEND => CFGOPT_REPO_AZURE_ACCOUNT,
|
|
|
|
&CFGDEF_COMMAND => CFGOPT_REPO_TYPE,
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_REPO_AZURE_VERIFY_TLS =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
|
|
|
&CFGDEF_DEFAULT => true,
|
|
|
|
&CFGDEF_DEPEND => CFGOPT_REPO_AZURE_ACCOUNT,
|
|
|
|
&CFGDEF_COMMAND => CFGOPT_REPO_TYPE,
|
|
|
|
},
|
|
|
|
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGOPT_REPO_S3_BUCKET =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_DEPEND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_REPO_TYPE,
|
|
|
|
&CFGDEF_DEPEND_LIST => [CFGOPTVAL_REPO_TYPE_S3],
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'repo-s3-bucket' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_COMMAND => CFGOPT_REPO_TYPE,
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGOPT_REPO_S3_CA_FILE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INHERIT => CFGOPT_REPO_S3_HOST,
|
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'repo-s3-ca-file' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_REPO_S3_CA_PATH =>
|
|
|
|
{
|
2019-03-14 11:48:33 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_PATH,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_INHERIT => CFGOPT_REPO_S3_HOST,
|
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'repo-s3-ca-path' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
|
|
|
},
|
2017-08-25 22:47:47 +02:00
|
|
|
|
2020-08-25 16:38:49 +02:00
|
|
|
&CFGOPT_REPO_S3_KEY_TYPE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INHERIT => CFGOPT_REPO_S3_BUCKET,
|
|
|
|
&CFGDEF_DEFAULT => 'shared',
|
|
|
|
&CFGDEF_ALLOW_LIST =>
|
|
|
|
[
|
|
|
|
'shared',
|
|
|
|
'auto',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGOPT_REPO_S3_KEY =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECURE => true,
|
2018-11-21 02:24:53 +02:00
|
|
|
&CFGDEF_REQUIRED => true,
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEPEND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2020-08-25 16:38:49 +02:00
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_REPO_S3_KEY_TYPE,
|
|
|
|
&CFGDEF_DEPEND_LIST => ['shared'],
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'repo-s3-key' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
2018-11-21 02:24:53 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_EXPIRE => {},
|
|
|
|
&CFGCMD_INFO => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_CREATE => {},
|
|
|
|
&CFGCMD_REPO_GET => {},
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_PUT => {},
|
|
|
|
&CFGCMD_REPO_RM => {},
|
2018-11-21 02:24:53 +02:00
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
|
|
|
&CFGCMD_START => {},
|
|
|
|
&CFGCMD_STOP => {},
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY => {},
|
2018-11-21 02:24:53 +02:00
|
|
|
},
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGOPT_REPO_S3_KEY_SECRET =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INHERIT => CFGOPT_REPO_S3_KEY,
|
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'repo-s3-key-secret' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
|
|
|
},
|
2017-08-25 22:47:47 +02:00
|
|
|
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGOPT_REPO_S3_ENDPOINT =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INHERIT => CFGOPT_REPO_S3_BUCKET,
|
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'repo-s3-endpoint' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
|
|
|
},
|
2017-08-25 22:47:47 +02:00
|
|
|
|
|
|
|
&CFGOPT_REPO_S3_HOST =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
2018-11-21 02:24:53 +02:00
|
|
|
&CFGDEF_REQUIRED => false,
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEPEND => CFGOPT_REPO_S3_BUCKET,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'repo-s3-host' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_COMMAND => CFGOPT_REPO_TYPE,
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
|
2019-07-25 23:36:51 +02:00
|
|
|
&CFGOPT_REPO_S3_PORT =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_INTEGER,
|
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
|
|
|
&CFGDEF_DEFAULT => 443,
|
|
|
|
&CFGDEF_ALLOW_RANGE => [1, 65535],
|
|
|
|
&CFGDEF_DEPEND => CFGOPT_REPO_S3_BUCKET,
|
|
|
|
&CFGDEF_COMMAND => CFGOPT_REPO_TYPE,
|
|
|
|
},
|
|
|
|
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGOPT_REPO_S3_REGION,
|
|
|
|
{
|
|
|
|
&CFGDEF_INHERIT => CFGOPT_REPO_S3_BUCKET,
|
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'repo-s3-region' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
|
|
|
},
|
2017-08-25 22:47:47 +02:00
|
|
|
|
2020-08-25 16:38:49 +02:00
|
|
|
&CFGOPT_REPO_S3_ROLE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INHERIT => CFGOPT_REPO_S3_BUCKET,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_DEPEND =>
|
|
|
|
{
|
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_REPO_S3_KEY_TYPE,
|
|
|
|
&CFGDEF_DEPEND_LIST => ['auto'],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2018-05-02 20:06:40 +02:00
|
|
|
&CFGOPT_REPO_S3_TOKEN =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INHERIT => CFGOPT_REPO_S3_KEY,
|
2018-11-21 02:24:53 +02:00
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_COMMAND => CFGOPT_REPO_TYPE,
|
2018-05-02 20:06:40 +02:00
|
|
|
},
|
|
|
|
|
2020-01-12 20:31:06 +02:00
|
|
|
&CFGOPT_REPO_S3_URI_STYLE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
|
|
|
&CFGDEF_DEFAULT => CFGOPTVAL_REPO_S3_URI_STYLE_HOST,
|
|
|
|
&CFGDEF_ALLOW_LIST =>
|
|
|
|
[
|
|
|
|
&CFGOPTVAL_REPO_S3_URI_STYLE_HOST,
|
|
|
|
&CFGOPTVAL_REPO_S3_URI_STYLE_PATH,
|
|
|
|
],
|
|
|
|
&CFGDEF_COMMAND => CFGOPT_REPO_TYPE,
|
|
|
|
&CFGDEF_DEPEND => CFGOPT_REPO_S3_BUCKET,
|
|
|
|
},
|
|
|
|
|
2019-05-21 16:14:41 +02:00
|
|
|
&CFGOPT_REPO_S3_VERIFY_TLS =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEFAULT => true,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-19 17:12:51 +02:00
|
|
|
'repo-s3-verify-ssl' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
2019-05-21 16:14:41 +02:00
|
|
|
'repo?-s3-verify-ssl' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_COMMAND => CFGOPT_REPO_TYPE,
|
|
|
|
&CFGDEF_DEPEND => CFGOPT_REPO_S3_BUCKET,
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_REPO_TYPE =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_REPO,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_REPO,
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEFAULT => CFGOPTVAL_REPO_TYPE_POSIX,
|
|
|
|
&CFGDEF_ALLOW_LIST =>
|
2017-08-25 22:47:47 +02:00
|
|
|
[
|
2020-07-02 22:24:34 +02:00
|
|
|
&CFGOPTVAL_REPO_TYPE_AZURE,
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGOPTVAL_REPO_TYPE_CIFS,
|
|
|
|
&CFGOPTVAL_REPO_TYPE_POSIX,
|
|
|
|
&CFGOPTVAL_REPO_TYPE_S3,
|
|
|
|
],
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'repo-type' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_EXPIRE => {},
|
|
|
|
&CFGCMD_INFO => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_CREATE => {},
|
|
|
|
&CFGCMD_REPO_GET => {},
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_PUT => {},
|
|
|
|
&CFGCMD_REPO_RM => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
2018-01-03 19:23:33 +02:00
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
|
|
|
&CFGCMD_START => {},
|
|
|
|
&CFGCMD_STOP => {},
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_SPOOL_PATH =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
2019-03-14 11:48:33 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_PATH,
|
2018-11-25 02:05:03 +02:00
|
|
|
&CFGDEF_DEFAULT => '/var/spool/' . PROJECT_EXE,
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2019-02-20 15:52:07 +02:00
|
|
|
&CFGCMD_ARCHIVE_GET =>
|
|
|
|
{
|
|
|
|
&CFGDEF_DEPEND =>
|
|
|
|
{
|
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_ARCHIVE_ASYNC,
|
|
|
|
&CFGDEF_DEPEND_LIST => [true],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH =>
|
|
|
|
{
|
|
|
|
&CFGDEF_DEPEND =>
|
|
|
|
{
|
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_ARCHIVE_ASYNC,
|
|
|
|
&CFGDEF_DEPEND_LIST => [true],
|
|
|
|
},
|
|
|
|
},
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_PROCESS_MAX =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_INTEGER,
|
|
|
|
&CFGDEF_DEFAULT => 1,
|
2019-04-08 00:20:03 +02:00
|
|
|
&CFGDEF_ALLOW_RANGE => [1, 999],
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2018-04-30 23:27:39 +02:00
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_RESTORE => {},
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
# Logging options
|
|
|
|
#-------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
&CFGOPT_LOG_LEVEL_CONSOLE =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_DEFAULT => lc(WARN),
|
|
|
|
&CFGDEF_ALLOW_LIST =>
|
2017-08-25 22:47:47 +02:00
|
|
|
[
|
|
|
|
lc(OFF),
|
|
|
|
lc(ERROR),
|
|
|
|
lc(WARN),
|
|
|
|
lc(INFO),
|
|
|
|
lc(DETAIL),
|
|
|
|
lc(DEBUG),
|
|
|
|
lc(TRACE),
|
|
|
|
],
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_EXPIRE => {},
|
|
|
|
&CFGCMD_INFO => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_CREATE => {},
|
|
|
|
&CFGCMD_REPO_GET => {},
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_PUT => {},
|
|
|
|
&CFGCMD_REPO_RM => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
2018-01-03 19:23:33 +02:00
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
|
|
|
&CFGCMD_START => {},
|
|
|
|
&CFGCMD_STOP => {},
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_LOG_LEVEL_FILE =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_DEFAULT => lc(INFO),
|
|
|
|
&CFGDEF_ALLOW_LIST => CFGOPT_LOG_LEVEL_CONSOLE,
|
2018-08-23 02:05:49 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_EXPIRE => {},
|
|
|
|
&CFGCMD_INFO => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_CREATE => {},
|
|
|
|
&CFGCMD_REPO_GET => {},
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_PUT => {},
|
|
|
|
&CFGCMD_REPO_RM => {},
|
2018-08-23 02:05:49 +02:00
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
|
|
|
&CFGCMD_START => {},
|
|
|
|
&CFGCMD_STOP => {},
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY => {},
|
2018-08-23 02:05:49 +02:00
|
|
|
}
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_LOG_LEVEL_STDERR =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_DEFAULT => lc(WARN),
|
|
|
|
&CFGDEF_ALLOW_LIST => CFGOPT_LOG_LEVEL_CONSOLE,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_EXPIRE => {},
|
|
|
|
&CFGCMD_INFO => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_CREATE => {},
|
|
|
|
&CFGCMD_REPO_GET => {},
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_PUT => {},
|
|
|
|
&CFGCMD_REPO_RM => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_RESTORE => {},
|
2018-02-05 22:19:28 +02:00
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
2018-08-23 02:05:49 +02:00
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
|
|
|
&CFGCMD_START => {},
|
|
|
|
&CFGCMD_STOP => {},
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY => {},
|
2018-08-23 02:05:49 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_LOG_SUBPROCESS =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_DEFAULT => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_EXPIRE => {},
|
|
|
|
&CFGCMD_INFO => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_CREATE => {},
|
|
|
|
&CFGCMD_REPO_GET => {},
|
2020-03-09 22:41:04 +02:00
|
|
|
&CFGCMD_REPO_LS => {},
|
2020-03-09 23:15:03 +02:00
|
|
|
&CFGCMD_REPO_PUT => {},
|
|
|
|
&CFGCMD_REPO_RM => {},
|
2018-08-23 02:05:49 +02:00
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
2018-02-05 22:19:28 +02:00
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_START => {},
|
|
|
|
&CFGCMD_STOP => {},
|
2020-09-22 17:57:38 +02:00
|
|
|
&CFGCMD_VERIFY => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_LOG_TIMESTAMP =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_DEFAULT => true,
|
|
|
|
&CFGDEF_COMMAND => CFGOPT_LOG_LEVEL_CONSOLE,
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
# Archive options
|
|
|
|
#-------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
&CFGOPT_ARCHIVE_ASYNC =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_DEFAULT => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2018-04-30 23:27:39 +02:00
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2018-04-19 01:37:35 +02:00
|
|
|
&CFGOPT_ARCHIVE_PUSH_QUEUE_MAX =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
2018-04-25 21:46:05 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_SIZE,
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_REQUIRED => false,
|
2018-04-19 01:37:35 +02:00
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
|
|
|
'archive-queue-max' => {},
|
|
|
|
},
|
|
|
|
&CFGDEF_ALLOW_RANGE => [0, 4 * 1024 * 1024 * 1024 * 1024 * 1024], # 0-4PB
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_PUSH => {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2018-04-30 23:27:39 +02:00
|
|
|
&CFGOPT_ARCHIVE_GET_QUEUE_MAX =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
2018-11-30 17:55:29 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_SIZE,
|
2018-04-30 23:27:39 +02:00
|
|
|
&CFGDEF_DEFAULT => 128 * 1024 * 1024, # 128MB
|
|
|
|
&CFGDEF_ALLOW_RANGE => [0, 4 * 1024 * 1024 * 1024 * 1024 * 1024], # 0-4PB
|
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2017-08-25 22:47:47 +02:00
|
|
|
# Backup options
|
|
|
|
#-------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
&CFGOPT_ARCHIVE_CHECK =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_DEFAULT => true,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2018-08-13 01:24:21 +02:00
|
|
|
&CFGCMD_BACKUP =>
|
|
|
|
{
|
|
|
|
&CFGDEF_DEPEND =>
|
|
|
|
{
|
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_ONLINE,
|
|
|
|
&CFGDEF_DEPEND_LIST => [true],
|
|
|
|
},
|
|
|
|
},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_ARCHIVE_COPY =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_DEFAULT => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_BACKUP =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEPEND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_ARCHIVE_CHECK,
|
|
|
|
&CFGDEF_DEPEND_LIST => [true],
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_BACKUP_STANDBY =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_DEFAULT => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_CHECKSUM_PAGE =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2018-08-27 21:51:05 +02:00
|
|
|
&CFGOPT_EXCLUDE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_LIST,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2020-07-14 14:12:25 +02:00
|
|
|
&CFGOPT_EXPIRE_AUTO =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_DEFAULT => true,
|
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGOPT_MANIFEST_SAVE_THRESHOLD =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
2018-04-25 21:46:05 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_SIZE,
|
2018-02-09 22:42:11 +02:00
|
|
|
&CFGDEF_DEFAULT => 1 * 1024 * 1024 * 1024,
|
|
|
|
&CFGDEF_ALLOW_RANGE => [1, 1024 * 1024 * 1024 * 1024], # 1-1TB
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_RESUME =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_DEFAULT => true,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_START_FAST =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_DEFAULT => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_STOP_AUTO =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_DEFAULT => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
# Restore options
|
|
|
|
#-------------------------------------------------------------------------------------------------------------------------------
|
2020-08-25 21:05:41 +02:00
|
|
|
&CFGOPT_ARCHIVE_MODE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_DEFAULT => 'preserve',
|
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
},
|
|
|
|
&CFGDEF_ALLOW_LIST =>
|
|
|
|
[
|
|
|
|
'off',
|
|
|
|
'preserve',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGOPT_DB_INCLUDE =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_LIST,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_LINK_ALL =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
|
|
|
&CFGDEF_DEFAULT => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_LINK_MAP =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_HASH,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_TABLESPACE_MAP_ALL =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_TABLESPACE_MAP =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_HASH,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_RECOVERY_OPTION =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_GLOBAL,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_HASH,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
},
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEPEND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_TYPE,
|
|
|
|
&CFGDEF_DEPEND_LIST =>
|
2017-08-25 22:47:47 +02:00
|
|
|
[
|
|
|
|
&CFGOPTVAL_RESTORE_TYPE_DEFAULT,
|
2018-03-07 00:12:16 +02:00
|
|
|
&CFGOPTVAL_RESTORE_TYPE_IMMEDIATE,
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGOPTVAL_RESTORE_TYPE_NAME,
|
|
|
|
&CFGOPTVAL_RESTORE_TYPE_TIME,
|
2019-09-26 23:39:45 +02:00
|
|
|
&CFGOPTVAL_RESTORE_TYPE_STANDBY,
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGOPTVAL_RESTORE_TYPE_XID,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
# Stanza options
|
|
|
|
#-------------------------------------------------------------------------------------------------------------------------------
|
2020-05-22 19:51:26 +02:00
|
|
|
&CFGOPT_PG_LOCAL =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_STANZA,
|
2020-05-22 19:51:26 +02:00
|
|
|
&CFGDEF_INTERNAL => true,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_PG,
|
2018-02-19 17:12:51 +02:00
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_PG,
|
2020-05-22 19:51:26 +02:00
|
|
|
&CFGDEF_DEFAULT => false,
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGCMD_ARCHIVE_GET =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INTERNAL => true,
|
|
|
|
},
|
|
|
|
&CFGCMD_ARCHIVE_PUSH =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INTERNAL => true,
|
|
|
|
},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_EXPIRE => {},
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGCMD_RESTORE =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INTERNAL => true,
|
|
|
|
},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
2018-01-03 19:23:33 +02:00
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
|
|
|
&CFGCMD_START => {},
|
|
|
|
&CFGCMD_STOP => {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2020-05-22 19:51:26 +02:00
|
|
|
&CFGOPT_PG_HOST =>
|
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_STANZA,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_PG,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_PG,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
|
|
|
'db-host' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
|
|
|
'db?-host' => {&CFGDEF_RESET => false},
|
|
|
|
},
|
|
|
|
&CFGDEF_COMMAND => CFGOPT_PG_LOCAL,
|
|
|
|
&CFGDEF_DEPEND =>
|
|
|
|
{
|
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_PG_LOCAL,
|
|
|
|
&CFGDEF_DEPEND_LIST => [false],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGOPT_PG_HOST_CMD =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_STANZA,
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_PG,
|
2018-02-19 17:12:51 +02:00
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_PG,
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGDEF_REQUIRED => false,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'db-cmd' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
|
|
|
'db?-cmd' => {&CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_EXPIRE => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
2018-01-03 19:23:33 +02:00
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
|
|
|
&CFGCMD_START => {},
|
|
|
|
&CFGCMD_STOP => {},
|
|
|
|
},
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEPEND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_PG_HOST
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGOPT_PG_HOST_CONFIG =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGDEF_INHERIT => CFGOPT_PG_HOST_CMD,
|
|
|
|
&CFGDEF_DEFAULT => CFGDEF_DEFAULT_CONFIG,
|
|
|
|
&CFGDEF_REQUIRED => true,
|
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'db-config' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
|
|
|
'db?-config' => {&CFGDEF_RESET => false},
|
2018-02-05 18:50:09 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2018-04-19 17:09:39 +02:00
|
|
|
&CFGOPT_PG_HOST_CONFIG_PATH =>
|
|
|
|
{
|
2019-03-14 11:48:33 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_PATH,
|
2018-04-19 17:09:39 +02:00
|
|
|
&CFGDEF_INHERIT => CFGOPT_PG_HOST_CMD,
|
|
|
|
&CFGDEF_DEFAULT => CFGDEF_DEFAULT_CONFIG_PATH,
|
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_PG_HOST_CONFIG_INCLUDE_PATH =>
|
|
|
|
{
|
2019-03-14 11:48:33 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_PATH,
|
2018-04-19 17:09:39 +02:00
|
|
|
&CFGDEF_INHERIT => CFGOPT_PG_HOST_CMD,
|
|
|
|
&CFGDEF_DEFAULT => CFGDEF_DEFAULT_CONFIG_INCLUDE_PATH,
|
|
|
|
},
|
|
|
|
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGOPT_PG_HOST_PORT =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INHERIT => CFGOPT_PG_HOST_CMD,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_INTEGER,
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_REQUIRED => false,
|
2018-02-09 22:42:11 +02:00
|
|
|
&CFGDEF_ALLOW_RANGE => [CFGDEF_DEFAULT_PROTOCOL_PORT_MIN, CFGDEF_DEFAULT_PROTOCOL_PORT_MAX],
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'db-ssh-port' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
|
|
|
'db?-ssh-port' => {&CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
2018-02-05 18:50:09 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
&CFGOPT_PG_HOST_USER =>
|
|
|
|
{
|
|
|
|
&CFGDEF_INHERIT => CFGOPT_PG_HOST_CMD,
|
|
|
|
&CFGDEF_DEFAULT => 'postgres',
|
|
|
|
&CFGDEF_NAME_ALT =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'db-user' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
|
|
|
'db?-user' => {&CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGDEF_REQUIRED => false,
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGOPT_PG_PATH =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_STANZA,
|
2019-03-14 11:48:33 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_PATH,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_PG,
|
2018-02-19 17:12:51 +02:00
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_PG,
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_REQUIRED => true,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'db-path' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
|
|
|
'db?-path' => {&CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2020-06-10 17:41:08 +02:00
|
|
|
&CFGCMD_ARCHIVE_GET => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_ARCHIVE_PUSH =>
|
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_REQUIRED => false
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_RESTORE => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
2018-01-03 19:23:33 +02:00
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGOPT_PG_PORT =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_STANZA,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_INTEGER,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_PG,
|
2018-02-19 17:12:51 +02:00
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_PG,
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEFAULT => 5432,
|
2018-02-09 22:42:11 +02:00
|
|
|
&CFGDEF_ALLOW_RANGE => [CFGDEF_DEFAULT_PROTOCOL_PORT_MIN, CFGDEF_DEFAULT_PROTOCOL_PORT_MAX],
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'db-port' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
|
|
|
'db?-port' => {&CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_COMMAND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
2018-01-03 19:23:33 +02:00
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
2017-08-25 22:47:47 +02:00
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_DEPEND =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_PG_PATH
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGOPT_PG_SOCKET_PATH =>
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGDEF_INHERIT => CFGOPT_PG_PORT,
|
2019-03-14 11:48:33 +02:00
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_PATH,
|
2018-02-05 18:50:09 +02:00
|
|
|
&CFGDEF_DEFAULT => undef,
|
2017-11-02 14:14:13 +02:00
|
|
|
&CFGDEF_REQUIRED => false,
|
2018-02-04 01:27:38 +02:00
|
|
|
&CFGDEF_NAME_ALT =>
|
|
|
|
{
|
2018-02-06 18:26:06 +02:00
|
|
|
'db-socket-path' => {&CFGDEF_INDEX => 1, &CFGDEF_RESET => false},
|
|
|
|
'db?-socket-path' => {&CFGDEF_RESET => false},
|
2018-02-04 01:27:38 +02:00
|
|
|
},
|
2017-08-25 22:47:47 +02:00
|
|
|
},
|
2019-12-19 18:26:38 +02:00
|
|
|
|
2019-12-19 23:20:11 +02:00
|
|
|
&CFGOPT_PG_USER =>
|
2019-12-19 18:26:38 +02:00
|
|
|
{
|
|
|
|
&CFGDEF_SECTION => CFGDEF_SECTION_STANZA,
|
|
|
|
&CFGDEF_TYPE => CFGDEF_TYPE_STRING,
|
|
|
|
&CFGDEF_PREFIX => CFGDEF_PREFIX_PG,
|
|
|
|
&CFGDEF_INDEX_TOTAL => CFGDEF_INDEX_PG,
|
|
|
|
&CFGDEF_REQUIRED => false,
|
|
|
|
&CFGDEF_COMMAND =>
|
|
|
|
{
|
|
|
|
&CFGCMD_BACKUP => {},
|
|
|
|
&CFGCMD_CHECK => {},
|
|
|
|
&CFGCMD_STANZA_CREATE => {},
|
|
|
|
&CFGCMD_STANZA_DELETE => {},
|
|
|
|
&CFGCMD_STANZA_UPGRADE => {},
|
|
|
|
},
|
|
|
|
&CFGDEF_DEPEND =>
|
|
|
|
{
|
|
|
|
&CFGDEF_DEPEND_OPTION => CFGOPT_PG_PATH
|
|
|
|
},
|
|
|
|
},
|
2017-08-25 22:47:47 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
####################################################################################################################################
|
2018-03-12 16:55:58 +02:00
|
|
|
# Process command define defaults
|
|
|
|
####################################################################################################################################
|
|
|
|
foreach my $strCommand (sort(keys(%{$rhCommandDefine})))
|
|
|
|
{
|
2019-05-28 18:18:05 +02:00
|
|
|
# Commands are external by default
|
|
|
|
if (!defined($rhCommandDefine->{$strCommand}{&CFGDEF_INTERNAL}))
|
|
|
|
{
|
|
|
|
$rhCommandDefine->{$strCommand}{&CFGDEF_INTERNAL} = false;
|
|
|
|
}
|
|
|
|
|
2018-03-12 16:55:58 +02:00
|
|
|
# Log files are created by default
|
|
|
|
if (!defined($rhCommandDefine->{$strCommand}{&CFGDEF_LOG_FILE}))
|
|
|
|
{
|
|
|
|
$rhCommandDefine->{$strCommand}{&CFGDEF_LOG_FILE} = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Default log level is INFO
|
|
|
|
if (!defined($rhCommandDefine->{$strCommand}{&CFGDEF_LOG_LEVEL_DEFAULT}))
|
|
|
|
{
|
|
|
|
$rhCommandDefine->{$strCommand}{&CFGDEF_LOG_LEVEL_DEFAULT} = INFO;
|
|
|
|
}
|
2018-03-19 19:08:42 +02:00
|
|
|
|
2018-04-11 15:36:12 +02:00
|
|
|
# Default lock required is false
|
|
|
|
if (!defined($rhCommandDefine->{$strCommand}{&CFGDEF_LOCK_REQUIRED}))
|
|
|
|
{
|
|
|
|
$rhCommandDefine->{$strCommand}{&CFGDEF_LOCK_REQUIRED} = false;
|
|
|
|
}
|
|
|
|
|
2019-03-27 23:14:06 +02:00
|
|
|
# Default lock remote required is false
|
|
|
|
if (!defined($rhCommandDefine->{$strCommand}{&CFGDEF_LOCK_REMOTE_REQUIRED}))
|
|
|
|
{
|
|
|
|
$rhCommandDefine->{$strCommand}{&CFGDEF_LOCK_REMOTE_REQUIRED} = false;
|
|
|
|
}
|
|
|
|
|
2018-04-11 15:36:12 +02:00
|
|
|
# Lock type must be set if a lock is required
|
|
|
|
if (!defined($rhCommandDefine->{$strCommand}{&CFGDEF_LOCK_TYPE}))
|
|
|
|
{
|
|
|
|
# Is a lock type required?
|
|
|
|
if ($rhCommandDefine->{$strCommand}{&CFGDEF_LOCK_REQUIRED})
|
|
|
|
{
|
|
|
|
confess &log(ERROR, "lock type is required for command '${strCommand}'");
|
|
|
|
}
|
|
|
|
|
|
|
|
$rhCommandDefine->{$strCommand}{&CFGDEF_LOCK_TYPE} = CFGDEF_LOCK_TYPE_NONE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if ($rhCommandDefine->{$strCommand}{&CFGDEF_LOCK_REQUIRED} &&
|
|
|
|
$rhCommandDefine->{$strCommand}{&CFGDEF_LOCK_TYPE} eq CFGDEF_LOCK_TYPE_NONE)
|
|
|
|
{
|
|
|
|
confess &log(ERROR, "lock type is required for command '${strCommand}' and cannot be 'none'");
|
|
|
|
}
|
|
|
|
}
|
2019-03-09 11:03:47 +02:00
|
|
|
|
|
|
|
# Default parameter allowed is false
|
|
|
|
if (!defined($rhCommandDefine->{$strCommand}{&CFGDEF_PARAMETER_ALLOWED}))
|
|
|
|
{
|
|
|
|
$rhCommandDefine->{$strCommand}{&CFGDEF_PARAMETER_ALLOWED} = false;
|
|
|
|
}
|
2018-03-12 16:55:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
####################################################################################################################################
|
|
|
|
# Process option define defaults
|
2017-08-25 22:47:47 +02:00
|
|
|
####################################################################################################################################
|
2017-11-02 14:14:13 +02:00
|
|
|
foreach my $strKey (sort(keys(%hConfigDefine)))
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2019-12-18 05:35:30 +02:00
|
|
|
# Error if prefix and index total are not both defined
|
|
|
|
if ((defined($hConfigDefine{$strKey}{&CFGDEF_PREFIX}) && !defined($hConfigDefine{$strKey}{&CFGDEF_INDEX_TOTAL})) ||
|
|
|
|
(!defined($hConfigDefine{$strKey}{&CFGDEF_PREFIX}) && defined($hConfigDefine{$strKey}{&CFGDEF_INDEX_TOTAL})))
|
|
|
|
{
|
|
|
|
confess &log(ASSERT, "CFGDEF_PREFIX and CFGDEF_INDEX_TOTAL must both be defined (or neither) for option '${strKey}'");
|
|
|
|
}
|
|
|
|
|
2017-11-02 14:14:13 +02:00
|
|
|
# If the define is a scalar then copy the entire define from the referenced option
|
2018-02-04 01:27:38 +02:00
|
|
|
if (defined($hConfigDefine{$strKey}{&CFGDEF_INHERIT}))
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2018-02-04 01:27:38 +02:00
|
|
|
# Make a copy in case there are overrides that need to be applied after inheriting
|
|
|
|
my $hConfigDefineOverride = dclone($hConfigDefine{$strKey});
|
|
|
|
|
|
|
|
# Copy the option being inherited from
|
|
|
|
$hConfigDefine{$strKey} = dclone($hConfigDefine{$hConfigDefine{$strKey}{&CFGDEF_INHERIT}});
|
|
|
|
|
2018-04-19 00:57:45 +02:00
|
|
|
# No need to copy the inheritance key
|
|
|
|
delete($hConfigDefine{$strKey}{&CFGDEF_INHERIT});
|
|
|
|
|
|
|
|
# It makes no sense to inherit alt names - they must be specified for each option
|
|
|
|
delete($hConfigDefine{$strKey}{&CFGDEF_NAME_ALT});
|
|
|
|
|
2018-02-04 01:27:38 +02:00
|
|
|
# Apply overrides
|
|
|
|
foreach my $strOptionDef (sort(keys(%{$hConfigDefineOverride})))
|
|
|
|
{
|
|
|
|
$hConfigDefine{$strKey}{$strOptionDef} = $hConfigDefineOverride->{$strOptionDef};
|
|
|
|
}
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# If the command section is a scalar then copy the section from the referenced option
|
2017-11-02 14:14:13 +02:00
|
|
|
if (defined($hConfigDefine{$strKey}{&CFGDEF_COMMAND}) && !ref($hConfigDefine{$strKey}{&CFGDEF_COMMAND}))
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
$hConfigDefine{$strKey}{&CFGDEF_COMMAND} =
|
|
|
|
dclone($hConfigDefine{$hConfigDefine{$strKey}{&CFGDEF_COMMAND}}{&CFGDEF_COMMAND});
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# If the required section is a scalar then copy the section from the referenced option
|
2017-11-02 14:14:13 +02:00
|
|
|
if (defined($hConfigDefine{$strKey}{&CFGDEF_DEPEND}) && !ref($hConfigDefine{$strKey}{&CFGDEF_DEPEND}))
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
$hConfigDefine{$strKey}{&CFGDEF_DEPEND} =
|
|
|
|
dclone($hConfigDefine{$hConfigDefine{$strKey}{&CFGDEF_DEPEND}}{&CFGDEF_DEPEND});
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# If the allow list is a scalar then copy the list from the referenced option
|
2017-11-02 14:14:13 +02:00
|
|
|
if (defined($hConfigDefine{$strKey}{&CFGDEF_ALLOW_LIST}) && !ref($hConfigDefine{$strKey}{&CFGDEF_ALLOW_LIST}))
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
$hConfigDefine{$strKey}{&CFGDEF_ALLOW_LIST} =
|
|
|
|
dclone($hConfigDefine{$hConfigDefine{$strKey}{&CFGDEF_ALLOW_LIST}}{&CFGDEF_ALLOW_LIST});
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# Default type is string
|
2017-11-02 14:14:13 +02:00
|
|
|
if (!defined($hConfigDefine{$strKey}{&CFGDEF_TYPE}))
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
|
|
|
&log(ASSERT, "type is required for option '${strKey}'");
|
|
|
|
}
|
|
|
|
|
2017-11-02 14:14:13 +02:00
|
|
|
# Default required is true
|
|
|
|
if (!defined($hConfigDefine{$strKey}{&CFGDEF_REQUIRED}))
|
|
|
|
{
|
|
|
|
$hConfigDefine{$strKey}{&CFGDEF_REQUIRED} = true;
|
|
|
|
}
|
|
|
|
|
2017-12-05 21:46:52 +02:00
|
|
|
# Default internal is false
|
|
|
|
if (!defined($hConfigDefine{$strKey}{&CFGDEF_INTERNAL}))
|
2017-11-02 14:14:13 +02:00
|
|
|
{
|
2017-12-05 21:46:52 +02:00
|
|
|
$hConfigDefine{$strKey}{&CFGDEF_INTERNAL} = false;
|
2017-11-02 14:14:13 +02:00
|
|
|
}
|
|
|
|
|
2018-02-19 17:12:51 +02:00
|
|
|
# Set index total for any option where it has not been explicitly defined
|
|
|
|
if (!defined($hConfigDefine{$strKey}{&CFGDEF_INDEX_TOTAL}))
|
2017-11-02 14:14:13 +02:00
|
|
|
{
|
|
|
|
$hConfigDefine{$strKey}{&CFGDEF_INDEX_TOTAL} = 1;
|
|
|
|
}
|
|
|
|
|
2018-02-06 18:26:06 +02:00
|
|
|
# All boolean config options can be negated. Boolean command-line options must be marked for negation individually.
|
|
|
|
if ($hConfigDefine{$strKey}{&CFGDEF_TYPE} eq CFGDEF_TYPE_BOOLEAN && defined($hConfigDefine{$strKey}{&CFGDEF_SECTION}))
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
$hConfigDefine{$strKey}{&CFGDEF_NEGATE} = true;
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# Default for negation is false
|
2017-11-02 14:14:13 +02:00
|
|
|
if (!defined($hConfigDefine{$strKey}{&CFGDEF_NEGATE}))
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
$hConfigDefine{$strKey}{&CFGDEF_NEGATE} = false;
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
|
2018-02-06 18:26:06 +02:00
|
|
|
# All config options can be reset
|
|
|
|
if (defined($hConfigDefine{$strKey}{&CFGDEF_SECTION}))
|
|
|
|
{
|
|
|
|
$hConfigDefine{$strKey}{&CFGDEF_RESET} = true;
|
|
|
|
}
|
2018-02-13 22:58:14 +02:00
|
|
|
elsif (!defined($hConfigDefine{$strKey}{&CFGDEF_RESET}))
|
2018-02-06 18:26:06 +02:00
|
|
|
{
|
|
|
|
$hConfigDefine{$strKey}{&CFGDEF_RESET} = false;
|
|
|
|
}
|
|
|
|
|
2017-08-25 22:47:47 +02:00
|
|
|
# By default options are not secure
|
2017-11-02 14:14:13 +02:00
|
|
|
if (!defined($hConfigDefine{$strKey}{&CFGDEF_SECURE}))
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
$hConfigDefine{$strKey}{&CFGDEF_SECURE} = false;
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# Set all indices to 1 by default - this defines how many copies of any option there can be
|
2017-11-02 14:14:13 +02:00
|
|
|
if (!defined($hConfigDefine{$strKey}{&CFGDEF_INDEX_TOTAL}))
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
$hConfigDefine{$strKey}{&CFGDEF_INDEX_TOTAL} = 1;
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
2018-02-09 22:42:11 +02:00
|
|
|
|
|
|
|
# All int and float options must have an allow range
|
|
|
|
if (($hConfigDefine{$strKey}{&CFGDEF_TYPE} eq CFGDEF_TYPE_INTEGER ||
|
2018-04-25 21:46:05 +02:00
|
|
|
$hConfigDefine{$strKey}{&CFGDEF_TYPE} eq CFGDEF_TYPE_FLOAT ||
|
|
|
|
$hConfigDefine{$strKey}{&CFGDEF_TYPE} eq CFGDEF_TYPE_SIZE) &&
|
2018-02-09 22:42:11 +02:00
|
|
|
!(defined($hConfigDefine{$strKey}{&CFGDEF_ALLOW_RANGE}) || defined($hConfigDefine{$strKey}{&CFGDEF_ALLOW_LIST})))
|
|
|
|
{
|
|
|
|
confess &log(ASSERT, "int/float option '${strKey}' must have allow range or list");
|
|
|
|
}
|
2018-03-12 16:55:58 +02:00
|
|
|
|
|
|
|
# Ensure all commands are valid
|
|
|
|
foreach my $strCommand (sort(keys(%{$hConfigDefine{$strKey}{&CFGDEF_COMMAND}})))
|
|
|
|
{
|
|
|
|
if (!defined($rhCommandDefine->{$strCommand}))
|
|
|
|
{
|
|
|
|
confess &log(ASSERT, "invalid command '${strCommand}'");
|
|
|
|
}
|
|
|
|
}
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
####################################################################################################################################
|
2018-03-12 16:55:58 +02:00
|
|
|
# Get option definition
|
2017-08-25 22:47:47 +02:00
|
|
|
####################################################################################################################################
|
2017-11-02 14:14:13 +02:00
|
|
|
sub cfgDefine
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
return dclone(\%hConfigDefine);
|
|
|
|
}
|
2017-08-25 22:47:47 +02:00
|
|
|
|
2017-11-02 14:14:13 +02:00
|
|
|
push @EXPORT, qw(cfgDefine);
|
2017-08-25 22:47:47 +02:00
|
|
|
|
2018-03-12 16:55:58 +02:00
|
|
|
####################################################################################################################################
|
|
|
|
# Get command definition
|
|
|
|
####################################################################################################################################
|
|
|
|
sub cfgDefineCommand
|
|
|
|
{
|
|
|
|
return dclone($rhCommandDefine);
|
|
|
|
}
|
|
|
|
|
|
|
|
push @EXPORT, qw(cfgDefineCommand);
|
2017-08-25 22:47:47 +02:00
|
|
|
|
2017-11-02 14:14:13 +02:00
|
|
|
####################################################################################################################################
|
|
|
|
# Get list of all commands
|
|
|
|
####################################################################################################################################
|
|
|
|
sub cfgDefineCommandList
|
|
|
|
{
|
|
|
|
# Return sorted list
|
2018-03-12 16:55:58 +02:00
|
|
|
return (sort(keys(%{$rhCommandDefine})));
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
|
2017-11-02 14:14:13 +02:00
|
|
|
push @EXPORT, qw(cfgDefineCommandList);
|
2017-08-25 22:47:47 +02:00
|
|
|
|
|
|
|
####################################################################################################################################
|
2017-11-02 14:14:13 +02:00
|
|
|
# Get list of all option types
|
2017-08-25 22:47:47 +02:00
|
|
|
####################################################################################################################################
|
2017-11-02 14:14:13 +02:00
|
|
|
sub cfgDefineOptionTypeList
|
2017-08-25 22:47:47 +02:00
|
|
|
{
|
2017-11-02 14:14:13 +02:00
|
|
|
my $rhOptionTypeMap;
|
|
|
|
|
|
|
|
# Get unique list of types
|
|
|
|
foreach my $strOption (sort(keys(%hConfigDefine)))
|
|
|
|
{
|
|
|
|
my $strOptionType = $hConfigDefine{$strOption}{&CFGDEF_TYPE};
|
|
|
|
|
|
|
|
if (!defined($rhOptionTypeMap->{$strOptionType}))
|
|
|
|
{
|
|
|
|
$rhOptionTypeMap->{$strOptionType} = true;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
# Return sorted list
|
|
|
|
return (sort(keys(%{$rhOptionTypeMap})));
|
2017-08-25 22:47:47 +02:00
|
|
|
}
|
|
|
|
|
2017-11-02 14:14:13 +02:00
|
|
|
push @EXPORT, qw(cfgDefineOptionTypeList);
|
2017-08-25 22:47:47 +02:00
|
|
|
|
|
|
|
1;
|