diff --git a/src/main.rs b/src/main.rs index 98f4cdb..21be4f4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -83,10 +83,14 @@ fn do_backup( let todos = Todo::plan(local_pool, backup_pool, snapshot_tag, snapshot_interval) .context("planning todos")?; - if !todos.is_empty() && ask_user_confirmation(&todos).context("asking user confirmation")? { - println!("executing:"); - execute_todos(local_pool, backup_pool, todos)?; - return Ok(true); + if todos.is_empty() { + println!("nothing to do"); + } else { + if ask_user_confirmation(&todos).context("asking user confirmation")? { + println!("executing:"); + execute_todos(local_pool, backup_pool, todos)?; + return Ok(true); + } } Ok(false) @@ -164,6 +168,7 @@ fn decrypt_backup(pools: &BackupPools) -> Result<(String, String)> { } fn encrypt_backup(crypt_device: String) -> Result<()> { + println!("encrypting {crypt_device}"); cryptsetup::close(&crypt_device) } diff --git a/src/zfs.rs b/src/zfs.rs index 5dcb2cc..e6e9e9c 100644 --- a/src/zfs.rs +++ b/src/zfs.rs @@ -91,6 +91,8 @@ impl ZPool { } pub fn export(self) -> Result<()> { + let name = &self.name; + println!("Exporting {name}"); zpool_export(&self.name) }