From 41e47c9648894465a9c6100e064177b17f4a0044 Mon Sep 17 00:00:00 2001 From: Orsiris de Jong Date: Sun, 3 Nov 2024 14:38:24 +0100 Subject: [PATCH] CLI: Allow deleting multiple snapshot at once --- npbackup/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npbackup/__main__.py b/npbackup/__main__.py index b4c4b9b..21a717a 100644 --- a/npbackup/__main__.py +++ b/npbackup/__main__.py @@ -126,7 +126,7 @@ This is free software, and you are welcome to redistribute it under certain cond type=str, default=None, required=False, - help="Forget given snapshot", + help="Forget given snapshot (accepts comma separated list of snapshots)", ) parser.add_argument( "--policy", @@ -614,7 +614,7 @@ This is free software, and you are welcome to redistribute it under certain cond cli_args["op_args"] = {"path": args.find} elif args.forget: cli_args["operation"] = "forget" - cli_args["op_args"] = {"snapshots": args.forget} + cli_args["op_args"] = {"snapshots": [snapshot.split() for snapshot in args.forget.split(',')]} elif args.policy or args.group_operation == "policy": cli_args["operation"] = "forget" cli_args["op_args"] = {"use_policy": True}