summaryrefslogtreecommitdiff
path: root/src/bin/obnam.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/obnam.rs')
-rw-r--r--src/bin/obnam.rs13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/bin/obnam.rs b/src/bin/obnam.rs
index 0552e3b..dcd09f6 100644
--- a/src/bin/obnam.rs
+++ b/src/bin/obnam.rs
@@ -6,8 +6,9 @@ use obnam::cmd::backup::Backup;
use obnam::cmd::init::Init;
use obnam::cmd::list::List;
use obnam::cmd::list_files::ListFiles;
+use obnam::cmd::restore::Restore;
use obnam::cmd::show_gen::ShowGeneration;
-use obnam::cmd::{get_chunk, restore, show_config};
+use obnam::cmd::{get_chunk, show_config};
use obnam::config::ClientConfig;
use std::path::{Path, PathBuf};
use structopt::StructOpt;
@@ -36,7 +37,7 @@ fn main() -> anyhow::Result<()> {
Command::List(x) => x.run(&config),
Command::ShowGeneration(x) => x.run(&config),
Command::ListFiles(x) => x.run(&config),
- Command::Restore { gen_id, to } => restore(&config, &gen_id, &to),
+ Command::Restore(x) => x.run(&config),
Command::GetChunk { chunk_id } => get_chunk(&config, &chunk_id),
Command::Config => show_config(&config),
}
@@ -103,13 +104,7 @@ enum Command {
Backup(Backup),
List(List),
ListFiles(ListFiles),
- Restore {
- #[structopt()]
- gen_id: String,
-
- #[structopt(parse(from_os_str))]
- to: PathBuf,
- },
+ Restore(Restore),
ShowGeneration(ShowGeneration),
GetChunk {
#[structopt()]