1
0
Fork 0

Documentation 3.5/arangobackup ops (#10056)

* Add which option is used by which ArangoBackup operation

* Max's feedback

* Kaveh's feedback
This commit is contained in:
Simran 2019-09-27 15:57:36 +02:00 committed by KVS85
parent 451bd6e85d
commit 6d3548fd92
1 changed files with 20 additions and 17 deletions

View File

@ -680,11 +680,13 @@ void BackupFeature::collectOptions(std::shared_ptr<options::ProgramOptions> opti
static_cast<std::underlying_type<Flags>::type>(Flags::Hidden)); static_cast<std::underlying_type<Flags>::type>(Flags::Hidden));
options->addOption("--allow-inconsistent", options->addOption("--allow-inconsistent",
"whether to attempt to continue in face of errors (may " "whether to attempt to continue in face of errors; "
"result in inconsistent backup state)", "may result in inconsistent backup state (create operation)",
new BooleanParameter(&_options.force)); new BooleanParameter(&_options.force));
options->addOption("--identifier", "a unique identifier for a backup", options->addOption("--identifier",
"a unique identifier for a backup "
"(restore/upload/download operation)",
new StringParameter(&_options.identifier)); new StringParameter(&_options.identifier));
// options->addOption("--include-search", "whether to include ArangoSearch data", // options->addOption("--include-search", "whether to include ArangoSearch data",
@ -692,43 +694,45 @@ void BackupFeature::collectOptions(std::shared_ptr<options::ProgramOptions> opti
options->addOption( options->addOption(
"--label", "--label",
"an additional label to add to the backup identifier upon creation", "an additional label to add to the backup identifier (create operation)",
new StringParameter(&_options.label)); new StringParameter(&_options.label));
options->addOption("--max-wait-for-lock", options->addOption("--max-wait-for-lock",
"maximum time to wait (in seconds) to aquire a lock on " "maximum time to wait in seconds to aquire a lock on "
"all necessary resources", "all necessary resources (create operation)",
new DoubleParameter(&_options.maxWaitForLock)); new DoubleParameter(&_options.maxWaitForLock));
options->addOption( options->addOption(
"--max-wait-for-restart", "--max-wait-for-restart",
"maximum time to wait (in seconds) for the server to restart after a " "maximum time to wait in seconds for the server to restart after a "
"restore operation before reporting an error; if zero, arangobackup will " "restore operation before reporting an error; if zero, arangobackup will "
"not wait to check that the server restarts and will simply return the " "not wait to check that the server restarts and will simply return the "
"result of the restore request", "result of the restore request (restore operation)",
new DoubleParameter(&_options.maxWaitForRestart)); new DoubleParameter(&_options.maxWaitForRestart));
options->addOption("--save-current", options->addOption("--save-current",
"whether to save the current state as a backup before " "whether to save the current state as a backup before "
"restoring to another state", "restoring to another state (restore operation)",
new BooleanParameter(&_options.saveCurrent)); new BooleanParameter(&_options.saveCurrent));
#ifdef USE_ENTERPRISE #ifdef USE_ENTERPRISE
options->addOption("--status-id", options->addOption("--status-id",
"returns the status of a transfere process", "returns the status of a transfer process "
"(upload/download operation)",
new StringParameter(&_options.statusId)); new StringParameter(&_options.statusId));
options->addOption("--rclone-config-file", options->addOption("--rclone-config-file",
"filename of the rclone configuration file used for" "filename of the rclone configuration file used for"
"file transfere", "file transfer (upload/download operation)",
new StringParameter(&_options.rcloneConfigFile)); new StringParameter(&_options.rcloneConfigFile));
options->addOption("--remote-path", options->addOption("--remote-path",
"remote rclone path of directory used to store or " "remote rclone path of directory used to store or "
"receive backups", "receive backups (upload/download operation)",
new StringParameter(&_options.remoteDirectory)); new StringParameter(&_options.remoteDirectory));
options->addOption("--abort", options->addOption("--abort",
"abort transfer with given status-id", "abort transfer with given status-id "
"(upload/download operation)",
new BooleanParameter(&_options.abort)); new BooleanParameter(&_options.abort));
#endif #endif
/* /*
@ -736,12 +740,11 @@ void BackupFeature::collectOptions(std::shared_ptr<options::ProgramOptions> opti
"remote", "Options detailing a remote connection to use for operations"); "remote", "Options detailing a remote connection to use for operations");
options->addOption("--remote.credentials", options->addOption("--remote.credentials",
"the credentials used for the remote endpoint (see manual " "the credentials used for the remote endpoint",
"for more details)",
new StringParameter(&_options.credentials)); new StringParameter(&_options.credentials));
options->addOption("--remote.endpoint", options->addOption("--remote.endpoint",
"the remote endpoint (see manual for more details)", "the remote endpoint",
new StringParameter(&_options.endpoint)); new StringParameter(&_options.endpoint));
*/ */
} }
@ -828,7 +831,7 @@ void BackupFeature::validateOptions(std::shared_ptr<options::ProgramOptions> opt
if (!_options.identifier.empty()) { if (!_options.identifier.empty()) {
if (_options.rcloneConfigFile.empty() || _options.remoteDirectory.empty()) { if (_options.rcloneConfigFile.empty() || _options.remoteDirectory.empty()) {
LOG_TOPIC("6063d", FATAL, Logger::BACKUP) << "for data transfere --rclone-config-file" LOG_TOPIC("6063d", FATAL, Logger::BACKUP) << "for data transfer --rclone-config-file"
" and --remote-path must be set"; " and --remote-path must be set";
FATAL_ERROR_EXIT(); FATAL_ERROR_EXIT();
} }