Add "stats" option to configuration (#303).

This commit is contained in:
Dan Helfman
2025-03-19 19:43:04 -07:00
parent d02d31f445
commit 3e21cdb579
3 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -328,7 +328,7 @@ def run_create(
local_path=local_path,
remote_path=remote_path,
progress=create_arguments.progress or config.get('progress'),
stats=create_arguments.stats,
stats=create_arguments.stats or config.get('stats'),
json=create_arguments.json,
list_files=create_arguments.list_files,
stream_processes=stream_processes,
+3 -2
View File
@@ -66,6 +66,7 @@ def prune_archives(
borgmatic.logger.add_custom_log_levels()
umask = config.get('umask', None)
lock_wait = config.get('lock_wait', None)
stats = prune_arguments.stats or config.get('stats')
extra_borg_options = config.get('extra_borg_options', {}).get('prune', '')
full_command = (
@@ -77,7 +78,7 @@ def prune_archives(
+ (('--lock-wait', str(lock_wait)) if lock_wait else ())
+ (
('--stats',)
if prune_arguments.stats
if stats
and not dry_run
and not feature.available(feature.Feature.NO_PRUNE_STATS, local_borg_version)
else ()
@@ -94,7 +95,7 @@ def prune_archives(
+ flags.make_repository_flags(repository_path, local_borg_version)
)
if prune_arguments.stats or prune_arguments.list_archives:
if stats or prune_arguments.list_archives:
output_log_level = logging.ANSWER
else:
output_log_level = logging.INFO
+7
View File
@@ -816,6 +816,13 @@ properties:
false.
default: false
example: true
stats:
type: boolean
description: |
Display statistics of an archive when running supported actions.
Defaults to false.
default: false
example: true
skip_actions:
type: array
items: