1
0
Fork 0

Remove broken option save-current.

This commit is contained in:
Max Neunhoeffer 2019-11-29 13:39:42 +01:00
parent 147bf2e607
commit 3a21d974ee
2 changed files with 0 additions and 34 deletions

View File

@ -361,7 +361,6 @@ arangodb::Result executeRestore(arangodb::httpclient::SimpleHttpClient& client,
{
VPackObjectBuilder guard(&bodyBuilder);
bodyBuilder.add("id", VPackValue(options.identifier));
bodyBuilder.add("saveCurrent", VPackValue(options.saveCurrent));
if (options.force) {
bodyBuilder.add("ignoreVersion", VPackValue(true));
}
@ -383,33 +382,6 @@ arangodb::Result executeRestore(arangodb::httpclient::SimpleHttpClient& client,
return result;
}
if (options.saveCurrent) {
VPackSlice const resBody = parsedBody->slice();
if (!resBody.isObject()) {
result.reset(TRI_ERROR_INTERNAL, "expected response to be an object");
return result;
}
TRI_ASSERT(resBody.isObject());
VPackSlice const resultObject = resBody.get("result");
if (!resultObject.isObject()) {
result.reset(TRI_ERROR_INTERNAL, "expected 'result' to be an object");
return result;
}
TRI_ASSERT(resultObject.isObject());
VPackSlice const previous = resultObject.get("previous");
if (!previous.isString()) {
result.reset(TRI_ERROR_INTERNAL, "expected previous to be a string");
return result;
}
TRI_ASSERT(previous.isString());
LOG_TOPIC("08c95", INFO, arangodb::Logger::BACKUP)
<< "current state was saved as backup with identifier '"
<< previous.copyString() << "'";
}
LOG_TOPIC("b6d4c", INFO, arangodb::Logger::BACKUP)
<< "Successfully restored '" << options.identifier << "'";
@ -733,11 +705,6 @@ void BackupFeature::collectOptions(std::shared_ptr<options::ProgramOptions> opti
"not wait to check that the server restarts and will simply return the "
"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 (restore operation)",
new BooleanParameter(&_options.saveCurrent));
#ifdef USE_ENTERPRISE
options->addOption("--status-id",
"returns the status of a transfer process "

View File

@ -65,7 +65,6 @@ class BackupFeature : public application_features::ApplicationFeature {
double maxWaitForLock = 60.0;
double maxWaitForRestart = 0.0;
std::string operation = "list";
bool saveCurrent = false;
bool abort = false;
};