Allow configuring retention limit
This commit is contained in:
@@ -24,6 +24,9 @@ struct Args {
|
|||||||
#[arg(short, long)]
|
#[arg(short, long)]
|
||||||
dry_run: bool,
|
dry_run: bool,
|
||||||
|
|
||||||
|
#[arg(short, long)]
|
||||||
|
retain: Option<usize>,
|
||||||
|
|
||||||
datasets: Vec<String>,
|
datasets: Vec<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,6 +45,9 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||||||
if let Some(cmd) = args.target_zfs_command {
|
if let Some(cmd) = args.target_zfs_command {
|
||||||
builder = builder.target_zfs_command(&cmd);
|
builder = builder.target_zfs_command(&cmd);
|
||||||
}
|
}
|
||||||
|
if let Some(retain) = args.retain {
|
||||||
|
builder = builder.retain(retain);
|
||||||
|
}
|
||||||
|
|
||||||
let (tx, rx) = channel();
|
let (tx, rx) = channel();
|
||||||
let mut pr = ProgressReporter::new(rx);
|
let mut pr = ProgressReporter::new(rx);
|
||||||
|
|||||||
Reference in New Issue
Block a user