mirror of
https://github.com/borgmatic-collective/borgmatic.git
synced 2026-07-30 05:13:01 +02:00
Add "progress" option to configuration (#303).
This commit is contained in:
@@ -37,7 +37,7 @@ def run_compact(
|
||||
global_arguments,
|
||||
local_path=local_path,
|
||||
remote_path=remote_path,
|
||||
progress=compact_arguments.progress,
|
||||
progress=compact_arguments.progress or config.get('progress'),
|
||||
cleanup_commits=compact_arguments.cleanup_commits,
|
||||
threshold=compact_arguments.threshold,
|
||||
)
|
||||
|
||||
@@ -327,7 +327,7 @@ def run_create(
|
||||
borgmatic_runtime_directory,
|
||||
local_path=local_path,
|
||||
remote_path=remote_path,
|
||||
progress=create_arguments.progress,
|
||||
progress=create_arguments.progress or config.get('progress'),
|
||||
stats=create_arguments.stats,
|
||||
json=create_arguments.json,
|
||||
list_files=create_arguments.list_files,
|
||||
|
||||
@@ -45,5 +45,5 @@ def run_extract(
|
||||
remote_path=remote_path,
|
||||
destination_path=extract_arguments.destination,
|
||||
strip_components=extract_arguments.strip_components,
|
||||
progress=extract_arguments.progress,
|
||||
progress=extract_arguments.progress or config.get('progress'),
|
||||
)
|
||||
|
||||
@@ -143,6 +143,7 @@ def check_archives(
|
||||
umask = config.get('umask')
|
||||
borg_exit_codes = config.get('borg_exit_codes')
|
||||
working_directory = borgmatic.config.paths.get_working_directory(config)
|
||||
progress = check_arguments.progress or config.get('progress')
|
||||
|
||||
if 'data' in checks:
|
||||
checks.add('archives')
|
||||
@@ -170,7 +171,7 @@ def check_archives(
|
||||
+ (('--log-json',) if global_arguments.log_json else ())
|
||||
+ (('--lock-wait', str(lock_wait)) if lock_wait else ())
|
||||
+ verbosity_flags
|
||||
+ (('--progress',) if check_arguments.progress else ())
|
||||
+ (('--progress',) if progress else ())
|
||||
+ (tuple(extra_borg_options.split(' ')) if extra_borg_options else ())
|
||||
+ flags.make_repository_flags(repository_path, local_borg_version)
|
||||
)
|
||||
@@ -180,7 +181,7 @@ def check_archives(
|
||||
# The Borg repair option triggers an interactive prompt, which won't work when output is
|
||||
# captured. And progress messes with the terminal directly.
|
||||
output_file=(
|
||||
DO_NOT_CAPTURE if check_arguments.repair or check_arguments.progress else None
|
||||
DO_NOT_CAPTURE if check_arguments.repair or progress else None
|
||||
),
|
||||
environment=environment.make_environment(config),
|
||||
working_directory=working_directory,
|
||||
|
||||
@@ -56,7 +56,7 @@ def transfer_archives(
|
||||
return execute_command(
|
||||
full_command,
|
||||
output_log_level=logging.ANSWER,
|
||||
output_file=DO_NOT_CAPTURE if transfer_arguments.progress else None,
|
||||
output_file=DO_NOT_CAPTURE if (transfer_arguments.progress or config.get('progress')) else None,
|
||||
environment=environment.make_environment(config),
|
||||
working_directory=borgmatic.config.paths.get_working_directory(config),
|
||||
borg_local_path=local_path,
|
||||
|
||||
@@ -305,6 +305,7 @@ DEFAULT_FALSE_FLAG_NAMES = {
|
||||
'healthchecks.create_slug',
|
||||
'repositories[0].append_only',
|
||||
'repositories[0].make_parent_dirs',
|
||||
'progress',
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -793,6 +793,12 @@ properties:
|
||||
Apply color to console output. Can be overridden with --no-color
|
||||
command-line flag. Defaults to true.
|
||||
example: false
|
||||
progress:
|
||||
type: boolean
|
||||
description: |
|
||||
Display progress as each file or archive is processed. Defaults to
|
||||
false.
|
||||
example: true
|
||||
skip_actions:
|
||||
type: array
|
||||
items:
|
||||
|
||||
Reference in New Issue
Block a user