You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-13 01:00:23 +02:00
Add support for additional pgBackRest configuration files.
Configuration files are loaded from the directory specified by the --config-include-path option. Add --config-path option for overriding the default base path of the --config and --config-include-path option. Contributed by Cynthia Shang.
This commit is contained in:
committed by
David Steele
parent
79b7552940
commit
27aa5f756e
@ -91,9 +91,12 @@ testRun()
|
||||
TEST_RESULT_VOID(configParse(strLstSize(argList), strLstPtr(argList)), "help from help command");
|
||||
TEST_RESULT_STR(strPtr(helpRender()), generalHelp, " check text");
|
||||
|
||||
// This test is broken up into multiple strings because C99 does not require compilers to support const strings > 4095 bytes
|
||||
// -------------------------------------------------------------------------------------------------------------------------
|
||||
const char *commandHelp = strPtr(strNewFmt(
|
||||
"%s - 'archive-push' command help\n"
|
||||
"%s%s%s",
|
||||
helpVersion,
|
||||
" - 'archive-push' command help\n"
|
||||
"\n"
|
||||
"Push a WAL segment to the archive.\n"
|
||||
"\n"
|
||||
@ -102,74 +105,85 @@ testRun()
|
||||
"\n"
|
||||
"Command Options:\n"
|
||||
"\n"
|
||||
" --archive-async archive WAL segments asynchronously [default=n]\n"
|
||||
" --archive-push-queue-max limit size (in bytes) of the PostgreSQL archive\n"
|
||||
" queue\n"
|
||||
" --archive-timeout archive timeout [default=60]\n"
|
||||
" --archive-async archive WAL segments asynchronously\n"
|
||||
" [default=n]\n"
|
||||
" --archive-push-queue-max limit size (in bytes) of the PostgreSQL\n"
|
||||
" archive queue\n"
|
||||
" --archive-timeout archive timeout [default=60]\n"
|
||||
"\n"
|
||||
"General Options:\n"
|
||||
"\n"
|
||||
" --buffer-size buffer size for file operations [current=32768,\n"
|
||||
" default=4194304]\n"
|
||||
" --cmd-ssh path to ssh client executable [default=ssh]\n"
|
||||
" --compress use gzip file compression [default=y]\n"
|
||||
" --compress-level compression level for stored files [default=6]\n"
|
||||
" --compress-level-network compression level for network transfer when\n"
|
||||
" compress=n [default=3]\n"
|
||||
" --config pgBackRest configuration file\n"
|
||||
" [default=/etc/pgbackrest.conf]\n"
|
||||
" --db-timeout database query timeout [default=1800]\n"
|
||||
" --lock-path path where lock files are stored\n"
|
||||
" [default=/tmp/pgbackrest]\n"
|
||||
" --neutral-umask use a neutral umask [default=y]\n"
|
||||
" --process-max max processes to use for compress/transfer\n"
|
||||
" [default=1]\n"
|
||||
" --protocol-timeout protocol timeout [default=1830]\n"
|
||||
" --spool-path path where transient data is stored\n"
|
||||
" [default=/var/spool/pgbackrest]\n"
|
||||
" --stanza defines the stanza\n"
|
||||
" --buffer-size buffer size for file operations\n"
|
||||
" [current=32768, default=4194304]\n"
|
||||
" --cmd-ssh path to ssh client executable [default=ssh]\n"
|
||||
" --compress use gzip file compression [default=y]\n"
|
||||
" --compress-level compression level for stored files\n"
|
||||
" [default=6]\n"
|
||||
" --compress-level-network compression level for network transfer when\n"
|
||||
" compress=n [default=3]\n"
|
||||
" --config pgBackRest configuration file\n"
|
||||
" [default=/etc/pgbackrest/pgbackrest.conf]\n"
|
||||
" --config-include-path path to additional pgBackRest configuration\n"
|
||||
" files [default=/etc/pgbackrest/conf.d]\n"
|
||||
" --config-path base path of pgBackRest configuration files\n"
|
||||
" [default=/etc/pgbackrest]\n"
|
||||
" --db-timeout database query timeout [default=1800]\n"
|
||||
" --lock-path path where lock files are stored\n"
|
||||
" [default=/tmp/pgbackrest]\n"
|
||||
" --neutral-umask use a neutral umask [default=y]\n"
|
||||
" --process-max max processes to use for compress/transfer\n"
|
||||
" [default=1]\n"
|
||||
" --protocol-timeout protocol timeout [default=1830]\n"
|
||||
" --spool-path path where transient data is stored\n"
|
||||
" [default=/var/spool/pgbackrest]\n"
|
||||
" --stanza defines the stanza\n"
|
||||
"\n"
|
||||
"Log Options:\n"
|
||||
"\n"
|
||||
" --log-level-console level for console logging [default=warn]\n"
|
||||
" --log-level-file level for file logging [default=info]\n"
|
||||
" --log-level-stderr level for stderr logging [default=warn]\n"
|
||||
" --log-path path where log files are stored\n"
|
||||
" [default=/var/log/pgbackrest]\n"
|
||||
" --log-timestamp enable timestamp in logging [default=y]\n"
|
||||
" --log-level-console level for console logging [default=warn]\n"
|
||||
" --log-level-file level for file logging [default=info]\n"
|
||||
" --log-level-stderr level for stderr logging [default=warn]\n"
|
||||
" --log-path path where log files are stored\n"
|
||||
" [default=/var/log/pgbackrest]\n"
|
||||
" --log-timestamp enable timestamp in logging [default=y]\n"
|
||||
"\n"
|
||||
"Repository Options:\n"
|
||||
"Repository Options:\n",
|
||||
"\n"
|
||||
" --repo-cipher-pass repository cipher passphrase\n"
|
||||
" --repo-cipher-type cipher used to encrypt the repository [default=none]\n"
|
||||
" --repo-host repository host when operating remotely via SSH\n"
|
||||
" [current=backup.example.net]\n"
|
||||
" --repo-host-cmd pgBackRest exe path on the repository host\n"
|
||||
" --repo-host-config pgBackRest repository host configuration file\n"
|
||||
" [default=/etc/pgbackrest.conf]\n"
|
||||
" --repo-host-port repository host port when repo-host is set\n"
|
||||
" --repo-host-user repository host user when repo-host is set\n"
|
||||
" [default=pgbackrest]\n"
|
||||
" --repo-path path where backups and archive are stored\n"
|
||||
" [default=/var/lib/pgbackrest]\n"
|
||||
" --repo-s3-bucket s3 repository bucket\n"
|
||||
" --repo-s3-ca-file s3 SSL CA File\n"
|
||||
" --repo-s3-ca-path s3 SSL CA Path\n"
|
||||
" --repo-s3-endpoint s3 repository endpoint\n"
|
||||
" --repo-s3-host s3 repository host\n"
|
||||
" --repo-s3-key s3 repository access key\n"
|
||||
" --repo-s3-key-secret s3 repository secret access key\n"
|
||||
" --repo-s3-region s3 repository region\n"
|
||||
" --repo-s3-verify-ssl verify S3 server certificate [default=y]\n"
|
||||
" --repo-type type of storage used for the repository\n"
|
||||
" [default=posix]\n"
|
||||
" --repo-cipher-pass repository cipher passphrase\n"
|
||||
" --repo-cipher-type cipher used to encrypt the repository\n"
|
||||
" [default=none]\n"
|
||||
" --repo-host repository host when operating remotely via\n"
|
||||
" SSH [current=backup.example.net]\n"
|
||||
" --repo-host-cmd pgBackRest exe path on the repository host\n"
|
||||
" --repo-host-config pgBackRest repository host configuration\n"
|
||||
" file\n"
|
||||
" [default=/etc/pgbackrest/pgbackrest.conf]\n"
|
||||
" --repo-host-config-include-path pgBackRest repository host configuration\n"
|
||||
" include path [default=/etc/pgbackrest/conf.d]\n"
|
||||
" --repo-host-config-path pgBackRest repository host configuration\n"
|
||||
" path [default=/etc/pgbackrest]\n"
|
||||
" --repo-host-port repository host port when repo-host is set\n"
|
||||
" --repo-host-user repository host user when repo-host is set\n"
|
||||
" [default=pgbackrest]\n"
|
||||
" --repo-path path where backups and archive are stored\n"
|
||||
" [default=/var/lib/pgbackrest]\n"
|
||||
" --repo-s3-bucket s3 repository bucket\n"
|
||||
" --repo-s3-ca-file s3 SSL CA File\n"
|
||||
" --repo-s3-ca-path s3 SSL CA Path\n"
|
||||
" --repo-s3-endpoint s3 repository endpoint\n"
|
||||
" --repo-s3-host s3 repository host\n"
|
||||
" --repo-s3-key s3 repository access key\n"
|
||||
" --repo-s3-key-secret s3 repository secret access key\n"
|
||||
" --repo-s3-region s3 repository region\n"
|
||||
" --repo-s3-verify-ssl verify S3 server certificate [default=y]\n"
|
||||
" --repo-type type of storage used for the repository\n"
|
||||
" [default=posix]\n"
|
||||
"\n"
|
||||
"Stanza Options:\n"
|
||||
"\n"
|
||||
" --pg-path postgreSQL data directory\n"
|
||||
" --pg-path postgreSQL data directory\n"
|
||||
"\n"
|
||||
"Use 'pgbackrest help archive-push [option]' for more information.\n",
|
||||
helpVersion));
|
||||
"Use 'pgbackrest help archive-push [option]' for more information.\n"));
|
||||
|
||||
argList = strLstNew();
|
||||
strLstAddZ(argList, "/path/to/pgbackrest");
|
||||
|
Reference in New Issue
Block a user