Browse Source

Tweak default check frequency to 1 month (#523).

Dan Helfman 3 years ago
parent
commit
ad0e2e0d7c

+ 2 - 2
borgmatic/borg/check.py

@@ -9,8 +9,8 @@ from borgmatic.borg import extract, info, state
 from borgmatic.execute import DO_NOT_CAPTURE, execute_command
 from borgmatic.execute import DO_NOT_CAPTURE, execute_command
 
 
 DEFAULT_CHECKS = (
 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}-'
 DEFAULT_PREFIX = '{hostname}-'
 
 

+ 3 - 3
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
 Another option is to customize your consistency checks. The default
 consistency checks run both full-repository checks and per-archive checks
 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
 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
 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
 ### 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
 ```yaml
 consistency:
 consistency:

+ 1 - 1
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():
 def test_filter_checks_on_frequency_without_config_uses_default_checks():
     flexmock(module).should_receive('parse_frequency').and_return(
     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('make_check_time_path')
     flexmock(module).should_receive('read_check_time').and_return(None)
     flexmock(module).should_receive('read_check_time').and_return(None)