Refactoring backups.

This commit is contained in:
Your Name
2025-04-26 21:06:42 +12:00
parent b07e3830de
commit e033489f9b
11 changed files with 298 additions and 97 deletions

View File

@ -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);