added stats to prune command, fixes #9262

-v / --info displays archive counts (total, kept, pruned).
This commit is contained in:
Thomas Waldmann 2026-02-28 07:09:51 +01:00
parent c18184550f
commit b2fe60c345
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -170,6 +170,8 @@ class PruneMixIn:
keep += prune_split(archives, rule, num, kept_because)
to_delete = set(archives) - set(keep)
logger.info("Found %d archives.", len(archives))
logger.info("Keeping %d archives, pruning %d archives.", len(keep), len(to_delete))
with Cache(repository, manifest, iec=args.iec) as cache:
list_logger = logging.getLogger("borg.output.list")
# set up counters for the progress display