summaryrefslogtreecommitdiff
path: root/bin/bbackupquery/BackupQueries.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2008-05-05 14:44:38 +0000
committerChris Wilson <chris+github@qwirx.com>2008-05-05 14:44:38 +0000
commit7eba897f6da8b1a993f0d40251af1748b5c793ea (patch)
treef1d09e475ba58ba38a8cf85424c45afb9578f6dc /bin/bbackupquery/BackupQueries.cpp
parent55c0054c6aeab12365ec30cd448a919f2ba19bd4 (diff)
Add restore -f option to force restore to continue after an error.
Diffstat (limited to 'bin/bbackupquery/BackupQueries.cpp')
-rw-r--r--bin/bbackupquery/BackupQueries.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/bin/bbackupquery/BackupQueries.cpp b/bin/bbackupquery/BackupQueries.cpp
index 61b7e85b..7a7eb5cc 100644
--- a/bin/bbackupquery/BackupQueries.cpp
+++ b/bin/bbackupquery/BackupQueries.cpp
@@ -217,7 +217,7 @@ void BackupQueries::DoCommand(const char *Command, bool isFromCommandLine)
{ "getobject", "" },
{ "get", "i" },
{ "compare", "alcqAEQ" },
- { "restore", "dri" },
+ { "restore", "drif" },
{ "help", "" },
{ "usage", "" },
{ "undelete", "" },
@@ -1966,7 +1966,7 @@ void BackupQueries::CommandRestore(const std::vector<std::string> &args, const b
// Check arguments
if(args.size() != 2)
{
- BOX_ERROR("Incorrect usage. restore [-d] [-r] [-i] <remote-name> <local-name>");
+ BOX_ERROR("Incorrect usage. restore [-drif] <remote-name> <local-name>");
return;
}
@@ -2029,7 +2029,8 @@ void BackupQueries::CommandRestore(const std::vector<std::string> &args, const b
localName.c_str(),
true /* print progress dots */, restoreDeleted,
false /* don't undelete after restore! */,
- opts['r'] /* resume? */);
+ opts['r'] /* resume? */,
+ opts['f'] /* force continue after errors */);
}
catch(std::exception &e)
{
@@ -2050,13 +2051,20 @@ void BackupQueries::CommandRestore(const std::vector<std::string> &args, const b
BOX_INFO("Restore complete.");
break;
+ case Restore_CompleteWithErrors:
+ BOX_WARNING("Restore complete, but some files could not be "
+ "restored.");
+ break;
+
case Restore_ResumePossible:
- BOX_ERROR("Resume possible -- repeat command with -r flag to resume");
+ BOX_ERROR("Resume possible -- repeat command with -r flag "
+ "to resume.");
SetReturnCode(COMMAND_RETURN_ERROR);
break;
case Restore_TargetExists:
- BOX_ERROR("The target directory exists. You cannot restore over an existing directory.");
+ BOX_ERROR("The target directory exists. You cannot restore "
+ "over an existing directory.");
SetReturnCode(COMMAND_RETURN_ERROR);
break;