From ad0e2e0d7c834fe4f188e3c3348a473acbba4b80 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sat, 28 May 2022 15:49:50 -0700 Subject: [PATCH] Tweak default check frequency to 1 month (#523). --- borgmatic/borg/check.py | 4 ++-- docs/how-to/deal-with-very-large-backups.md | 6 +++--- tests/unit/borg/test_check.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/borgmatic/borg/check.py b/borgmatic/borg/check.py index a3dd4d7..f92e49a 100644 --- a/borgmatic/borg/check.py +++ b/borgmatic/borg/check.py @@ -9,8 +9,8 @@ from borgmatic.borg import extract, info, state from borgmatic.execute import DO_NOT_CAPTURE, execute_command DEFAULT_CHECKS = ( - {'name': 'repository', 'frequency': '2 weeks'}, - {'name': 'archives', 'frequency': '2 weeks'}, + {'name': 'repository', 'frequency': '1 month'}, + {'name': 'archives', 'frequency': '1 month'}, ) DEFAULT_PREFIX = '{hostname}-' diff --git a/docs/how-to/deal-with-very-large-backups.md b/docs/how-to/deal-with-very-large-backups.md index 1da9b46..4b1d610 100644 --- a/docs/how-to/deal-with-very-large-backups.md +++ b/docs/how-to/deal-with-very-large-backups.md @@ -49,7 +49,7 @@ consistency checks with `check` on a much less frequent basis (e.g. with Another option is to customize your consistency checks. The default consistency checks run both full-repository checks and per-archive checks -within each repository no more than once every two weeks. +within each repository no more than once a month. But if you find that archive checks are too slow, for example, you can configure borgmatic to run repository checks only. Configure this in the @@ -72,8 +72,8 @@ See [Borg's check documentation](https://borgbackup.readthedocs.io/en/stable/usa ### Check frequency -You can optionally configure checks to run on a periodic basis rather than -every time borgmatic runs checks. For instance: +As of borgmatic 1.6.2, you can optionally configure checks to run on a +periodic basis rather than every time borgmatic runs checks. For instance: ```yaml consistency: diff --git a/tests/unit/borg/test_check.py b/tests/unit/borg/test_check.py index 8aa6b40..1f69d6a 100644 --- a/tests/unit/borg/test_check.py +++ b/tests/unit/borg/test_check.py @@ -103,7 +103,7 @@ def test_parse_frequency_raises_on_parse_error(frequency): def test_filter_checks_on_frequency_without_config_uses_default_checks(): flexmock(module).should_receive('parse_frequency').and_return( - module.datetime.timedelta(weeks=2) + module.datetime.timedelta(weeks=4) ) flexmock(module).should_receive('make_check_time_path') flexmock(module).should_receive('read_check_time').and_return(None)