Allow configuring retention limit

This commit is contained in:
2026-04-26 12:24:09 +02:00
parent e173cf2df3
commit c2ccccc88f

View File

@@ -24,6 +24,9 @@ struct Args {
#[arg(short, long)]
dry_run: bool,
#[arg(short, long)]
retain: Option<usize>,
datasets: Vec<String>,
}
@@ -42,6 +45,9 @@ fn main() -> Result<(), Box<dyn Error>> {
if let Some(cmd) = args.target_zfs_command {
builder = builder.target_zfs_command(&cmd);
}
if let Some(retain) = args.retain {
builder = builder.retain(retain);
}
let (tx, rx) = channel();
let mut pr = ProgressReporter::new(rx);