fix message output
This commit is contained in:
+6
-1
@@ -83,11 +83,15 @@ fn do_backup(
|
|||||||
let todos = Todo::plan(local_pool, backup_pool, snapshot_tag, snapshot_interval)
|
let todos = Todo::plan(local_pool, backup_pool, snapshot_tag, snapshot_interval)
|
||||||
.context("planning todos")?;
|
.context("planning todos")?;
|
||||||
|
|
||||||
if !todos.is_empty() && ask_user_confirmation(&todos).context("asking user confirmation")? {
|
if todos.is_empty() {
|
||||||
|
println!("nothing to do");
|
||||||
|
} else {
|
||||||
|
if ask_user_confirmation(&todos).context("asking user confirmation")? {
|
||||||
println!("executing:");
|
println!("executing:");
|
||||||
execute_todos(local_pool, backup_pool, todos)?;
|
execute_todos(local_pool, backup_pool, todos)?;
|
||||||
return Ok(true);
|
return Ok(true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Ok(false)
|
Ok(false)
|
||||||
}
|
}
|
||||||
@@ -164,6 +168,7 @@ fn decrypt_backup(pools: &BackupPools) -> Result<(String, String)> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn encrypt_backup(crypt_device: String) -> Result<()> {
|
fn encrypt_backup(crypt_device: String) -> Result<()> {
|
||||||
|
println!("encrypting {crypt_device}");
|
||||||
cryptsetup::close(&crypt_device)
|
cryptsetup::close(&crypt_device)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,6 +91,8 @@ impl ZPool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn export(self) -> Result<()> {
|
pub fn export(self) -> Result<()> {
|
||||||
|
let name = &self.name;
|
||||||
|
println!("Exporting {name}");
|
||||||
zpool_export(&self.name)
|
zpool_export(&self.name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user