Compare commits
No commits in common. "f7f852a28b12e557c27d266685c717806cafcfbb" and "65ab230961d646fb977ef68e926379e96a87506f" have entirely different histories.
f7f852a28b
...
65ab230961
|
@ -150,8 +150,7 @@ map:
|
||||||
"borg help placeholders" for details. Default is
|
"borg help placeholders" for details. Default is
|
||||||
"{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f}". If you specify this option, you must
|
"{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f}". If you specify this option, you must
|
||||||
also specify a prefix in the retention section to avoid accidental pruning of
|
also specify a prefix in the retention section to avoid accidental pruning of
|
||||||
archives with a different archive name format. And you should also specify a
|
archives with a different archive name format.
|
||||||
prefix in the consistency section as well.
|
|
||||||
example: "{hostname}-documents-{now}"
|
example: "{hostname}-documents-{now}"
|
||||||
retention:
|
retention:
|
||||||
desc: |
|
desc: |
|
||||||
|
|
|
@ -54,7 +54,7 @@ def apply_logical_validation(config_filename, parsed_configuration):
|
||||||
|
|
||||||
consistency_prefix = parsed_configuration.get('consistency', {}).get('prefix')
|
consistency_prefix = parsed_configuration.get('consistency', {}).get('prefix')
|
||||||
if archive_name_format and not consistency_prefix:
|
if archive_name_format and not consistency_prefix:
|
||||||
logger.warning('Since version 1.1.16, if you provide `archive_name_format`, you should also'
|
logger.warning('Since version 1.2.0, if you provide `archive_name_format`, you must also'
|
||||||
' specify `consistency.prefix`.')
|
' specify `consistency.prefix`.')
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ def test_check_archives_calls_borg_with_parameters(checks):
|
||||||
flexmock(module).should_receive('_make_check_flags').with_args(checks, check_last).and_return(())
|
flexmock(module).should_receive('_make_check_flags').with_args(checks, check_last).and_return(())
|
||||||
stdout = flexmock()
|
stdout = flexmock()
|
||||||
insert_subprocess_mock(
|
insert_subprocess_mock(
|
||||||
('borg', 'check', 'repo', '--prefix', '{hostname}-'),
|
('borg', 'check', 'repo'),
|
||||||
stdout=stdout, stderr=STDOUT,
|
stdout=stdout, stderr=STDOUT,
|
||||||
)
|
)
|
||||||
flexmock(sys.modules['builtins']).should_receive('open').and_return(stdout)
|
flexmock(sys.modules['builtins']).should_receive('open').and_return(stdout)
|
||||||
|
@ -131,7 +131,7 @@ def test_check_archives_with_verbosity_some_calls_borg_with_info_parameter():
|
||||||
flexmock(module).should_receive('_parse_checks').and_return(checks)
|
flexmock(module).should_receive('_parse_checks').and_return(checks)
|
||||||
flexmock(module).should_receive('_make_check_flags').and_return(())
|
flexmock(module).should_receive('_make_check_flags').and_return(())
|
||||||
insert_subprocess_mock(
|
insert_subprocess_mock(
|
||||||
('borg', 'check', 'repo', '--prefix', '{hostname}-', '--info'),
|
('borg', 'check', 'repo', '--info'),
|
||||||
stdout=None, stderr=STDOUT,
|
stdout=None, stderr=STDOUT,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ def test_check_archives_with_verbosity_lots_calls_borg_with_debug_parameter():
|
||||||
flexmock(module).should_receive('_parse_checks').and_return(checks)
|
flexmock(module).should_receive('_parse_checks').and_return(checks)
|
||||||
flexmock(module).should_receive('_make_check_flags').and_return(())
|
flexmock(module).should_receive('_make_check_flags').and_return(())
|
||||||
insert_subprocess_mock(
|
insert_subprocess_mock(
|
||||||
('borg', 'check', 'repo', '--prefix', '{hostname}-', '--debug'),
|
('borg', 'check', 'repo', '--debug'),
|
||||||
stdout=None, stderr=STDOUT,
|
stdout=None, stderr=STDOUT,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ def test_check_archives_with_local_path_calls_borg_via_local_path():
|
||||||
flexmock(module).should_receive('_make_check_flags').with_args(checks, check_last).and_return(())
|
flexmock(module).should_receive('_make_check_flags').with_args(checks, check_last).and_return(())
|
||||||
stdout = flexmock()
|
stdout = flexmock()
|
||||||
insert_subprocess_mock(
|
insert_subprocess_mock(
|
||||||
('borg1', 'check', 'repo', '--prefix', '{hostname}-'),
|
('borg1', 'check', 'repo'),
|
||||||
stdout=stdout, stderr=STDOUT,
|
stdout=stdout, stderr=STDOUT,
|
||||||
)
|
)
|
||||||
flexmock(sys.modules['builtins']).should_receive('open').and_return(stdout)
|
flexmock(sys.modules['builtins']).should_receive('open').and_return(stdout)
|
||||||
|
@ -205,7 +205,7 @@ def test_check_archives_with_remote_path_calls_borg_with_remote_path_parameters(
|
||||||
flexmock(module).should_receive('_make_check_flags').with_args(checks, check_last).and_return(())
|
flexmock(module).should_receive('_make_check_flags').with_args(checks, check_last).and_return(())
|
||||||
stdout = flexmock()
|
stdout = flexmock()
|
||||||
insert_subprocess_mock(
|
insert_subprocess_mock(
|
||||||
('borg', 'check', 'repo', '--prefix', '{hostname}-', '--remote-path', 'borg1'),
|
('borg', 'check', 'repo', '--remote-path', 'borg1'),
|
||||||
stdout=stdout, stderr=STDOUT,
|
stdout=stdout, stderr=STDOUT,
|
||||||
)
|
)
|
||||||
flexmock(sys.modules['builtins']).should_receive('open').and_return(stdout)
|
flexmock(sys.modules['builtins']).should_receive('open').and_return(stdout)
|
||||||
|
@ -228,7 +228,7 @@ def test_check_archives_with_lock_wait_calls_borg_with_lock_wait_parameters():
|
||||||
flexmock(module).should_receive('_make_check_flags').with_args(checks, check_last).and_return(())
|
flexmock(module).should_receive('_make_check_flags').with_args(checks, check_last).and_return(())
|
||||||
stdout = flexmock()
|
stdout = flexmock()
|
||||||
insert_subprocess_mock(
|
insert_subprocess_mock(
|
||||||
('borg', 'check', 'repo', '--prefix', '{hostname}-', '--lock-wait', '5'),
|
('borg', 'check', 'repo', '--lock-wait', '5'),
|
||||||
stdout=stdout, stderr=STDOUT,
|
stdout=stdout, stderr=STDOUT,
|
||||||
)
|
)
|
||||||
flexmock(sys.modules['builtins']).should_receive('open').and_return(stdout)
|
flexmock(sys.modules['builtins']).should_receive('open').and_return(stdout)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user