Refactoring backups.
This commit is contained in:
16
src/main.cpp
16
src/main.cpp
@ -181,6 +181,22 @@ int main(int argc, char* argv[]) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (cmd == "backup" || cmd=="backups") {
|
||||
if (argc < 4) {
|
||||
std::cerr << "Error: backup requires a target server and target service to back up" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
return dropshell::main_commands::backup(argvec);
|
||||
}
|
||||
|
||||
if (cmd == "restore") {
|
||||
if (argc < 4) {
|
||||
std::cerr << "Error: restore requires a target server, target service the backup file to restore" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
return dropshell::main_commands::restore(argvec);
|
||||
}
|
||||
|
||||
// handle running a command.
|
||||
std::set<std::string> commands;
|
||||
dropshell::get_all_used_commands(commands);
|
||||
|
Reference in New Issue
Block a user