diff options
Diffstat (limited to 'src/cmd/restore.rs')
-rw-r--r-- | src/cmd/restore.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/cmd/restore.rs b/src/cmd/restore.rs index 27f0ce3..791bebf 100644 --- a/src/cmd/restore.rs +++ b/src/cmd/restore.rs @@ -14,7 +14,7 @@ use std::path::{Path, PathBuf}; use structopt::StructOpt; use tempfile::NamedTempFile; -pub fn restore(config: &Path, gen_id: &str, to: &Path) -> anyhow::Result<()> { +pub fn restore(config: &ClientConfig, gen_id: &str, to: &Path) -> anyhow::Result<()> { // Create a named temporary file. We don't meed the open file // handle, so we discard that. let dbname = { @@ -23,8 +23,6 @@ pub fn restore(config: &Path, gen_id: &str, to: &Path) -> anyhow::Result<()> { dbname }; - let config = ClientConfig::read_config(&config).unwrap(); - let client = BackupClient::new(&config.server_url)?; let gen_chunk = client.fetch_generation(&gen_id)?; debug!("gen: {:?}", gen_chunk); |