mirror of
https://github.com/borgmatic-collective/borgmatic.git
synced 2026-08-03 23:13:02 +02:00
Add "stats" option to configuration (#303).
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user