diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-05-05 14:44:38 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-05-05 14:44:38 +0000 |
commit | 7eba897f6da8b1a993f0d40251af1748b5c793ea (patch) | |
tree | f1d09e475ba58ba38a8cf85424c45afb9578f6dc /bin | |
parent | 55c0054c6aeab12365ec30cd448a919f2ba19bd4 (diff) |
Add restore -f option to force restore to continue after an error.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/bbackupquery/BackupQueries.cpp | 18 | ||||
-rw-r--r-- | bin/bbackupquery/documentation.txt | 3 |
2 files changed, 15 insertions, 6 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; diff --git a/bin/bbackupquery/documentation.txt b/bin/bbackupquery/documentation.txt index 42217edc..84126bee 100644 --- a/bin/bbackupquery/documentation.txt +++ b/bin/bbackupquery/documentation.txt @@ -116,7 +116,7 @@ compare <store-dir-name> <local-dir-name> This can be used for automated tests. < -> restore [-d] [-r] [-i] <directory-name> <local-directory-name> +> restore [-drif] <directory-name> <local-directory-name> Restores a directory to the local disc. The local directory specified must not exist (unless a previous restore is being restarted). @@ -126,6 +126,7 @@ compare <store-dir-name> <local-dir-name> -d -- restore a deleted directory or deleted files inside -r -- resume an interrupted restoration -i -- directory name is actually an ID + -f -- force restore to continue if errors are encountered If a restore operation is interrupted for any reason, it can be restarted using the -r switch. Restore progress information is saved in a file at |