From 62a822f64c031c9b1a111927ed80ea3ec3ef4a3e Mon Sep 17 00:00:00 2001 From: Simran Date: Mon, 7 Oct 2019 11:49:25 +0200 Subject: [PATCH] Docs: Add which option is used by which ArangoBackup operation (#9934) --- arangosh/Backup/BackupFeature.cpp | 37 +++++++++++++++++-------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/arangosh/Backup/BackupFeature.cpp b/arangosh/Backup/BackupFeature.cpp index 9924508054..d42bac099e 100644 --- a/arangosh/Backup/BackupFeature.cpp +++ b/arangosh/Backup/BackupFeature.cpp @@ -698,11 +698,13 @@ void BackupFeature::collectOptions(std::shared_ptr opti static_cast::type>(Flags::Hidden)); options->addOption("--allow-inconsistent", - "whether to attempt to continue in face of errors (may " - "result in inconsistent backup state)", + "whether to attempt to continue in face of errors; " + "may result in inconsistent backup state (create operation)", 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)); // options->addOption("--include-search", "whether to include ArangoSearch data", @@ -710,43 +712,45 @@ void BackupFeature::collectOptions(std::shared_ptr opti options->addOption( "--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)); options->addOption("--max-wait-for-lock", - "maximum time to wait (in seconds) to aquire a lock on " - "all necessary resources", + "maximum time to wait in seconds to aquire a lock on " + "all necessary resources (create operation)", new DoubleParameter(&_options.maxWaitForLock)); options->addOption( "--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 " "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)); options->addOption("--save-current", "whether to save the current state as a backup before " - "restoring to another state", + "restoring to another state (restore operation)", new BooleanParameter(&_options.saveCurrent)); #ifdef USE_ENTERPRISE 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)); options->addOption("--rclone-config-file", "filename of the rclone configuration file used for" - "file transfere", + "file transfer (upload/download operation)", new StringParameter(&_options.rcloneConfigFile)); options->addOption("--remote-path", "remote rclone path of directory used to store or " - "receive backups", + "receive backups (upload/download operation)", new StringParameter(&_options.remoteDirectory)); options->addOption("--abort", - "abort transfer with given status-id", + "abort transfer with given status-id " + "(upload/download operation)", new BooleanParameter(&_options.abort)); #endif /* @@ -754,12 +758,11 @@ void BackupFeature::collectOptions(std::shared_ptr opti "remote", "Options detailing a remote connection to use for operations"); options->addOption("--remote.credentials", - "the credentials used for the remote endpoint (see manual " - "for more details)", + "the credentials used for the remote endpoint", new StringParameter(&_options.credentials)); options->addOption("--remote.endpoint", - "the remote endpoint (see manual for more details)", + "the remote endpoint", new StringParameter(&_options.endpoint)); */ } @@ -846,7 +849,7 @@ void BackupFeature::validateOptions(std::shared_ptr opt if (!_options.identifier.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"; FATAL_ERROR_EXIT(); }