Repository and archive checks skipped when default 'always' expected #653

Closed
opened 2023-03-17 14:01:37 +00:00 by krivine · 7 comments

What I'm trying to do and why

Understand why archive and repo checks are not run every time, as was the case before ugrading to borgmatic 1.5.20

Change config if appropriate

Steps to reproduce (if a bug)

# borgmatic -c ./config-new.yaml --verbosity 2

Actual behavior (if a bug)

No value is set for frequency of checks. Despite this, borgmatic assumes a frequency of 28 days.

Skipping repository check due to configured frequency; 28 days, 18:24:36.045834 until next check
Skipping archives check due to configured frequency; 28 days, 18:24:36.045687 until next check

See forupload.txt attached

Expected behavior (if a bug)

Checks run at every time.

Environment

borgmatic version: 1.5.20

borgmatic installation method: Linux Mint repo

Borg version: borg 1.2.0`

Python version: Python 3.10.6

operating system and version: Linux Kernel: 5.19.0-35-generic x86_64 bits: 64 compiler: N/A Desktop: MATE 1.26.0 wm: marco
dm: LightDM Distro: Linux Mint 21.1 Vera base: Ubuntu 22.04 jammy

#### What I'm trying to do and why Understand why archive and repo checks are not run every time, as was the case before ugrading to borgmatic 1.5.20 Change config if appropriate #### Steps to reproduce (if a bug) \# borgmatic -c ./config-new.yaml --verbosity 2 #### Actual behavior (if a bug) No value is set for frequency of checks. Despite this, borgmatic assumes a frequency of 28 days. ``` Skipping repository check due to configured frequency; 28 days, 18:24:36.045834 until next check Skipping archives check due to configured frequency; 28 days, 18:24:36.045687 until next check ``` See forupload.txt attached #### Expected behavior (if a bug) Checks run at every time. #### Environment **borgmatic version:** 1.5.20 **borgmatic installation method:** Linux Mint repo **Borg version:** borg 1.2.0` **Python version:** Python 3.10.6 **operating system and version:** Linux Kernel: 5.19.0-35-generic x86_64 bits: 64 compiler: N/A Desktop: MATE 1.26.0 wm: marco dm: LightDM Distro: Linux Mint 21.1 Vera base: Ubuntu 22.04 jammy
Owner

First of all, thanks for including your borgmatic configuration and log output. That helps a ton with debugging this. Are you sure you're running borgmatic 1.5.20? The consistency check frequency feature was first added in borgmatic 1.6.2, so I wouldn't expect to see Skipping repository check due to configured frequency in your logs unless you're running borgmatic 1.6.2+.

Assuming you've got a newer version of borgmatic, here's the documented behavior:

By default, if you omit consistency checks from configuration, borgmatic runs full-repository checks (repository) and per-archive checks (archives) within each repository, no more than once a month.

So since you've got the consistency check frequency commented out from your configuration, borgmatic is defaulting to running checks once a month. This is an intentional change in the default from old versions of borgmatic!

What if you want the old behavior? You can simply configure your desired checks in configuration with a frequency of always. Or, if you just want to run checks as a one-off, ignoring the configured/default frequency: borgmatic check --force.

Since I think all this isn't 100% clear in the documentation, I'll try to clarify this behavior!

First of all, thanks for including your borgmatic configuration and log output. That helps a ton with debugging this. Are you sure you're running borgmatic 1.5.20? The consistency check frequency feature was first added in borgmatic 1.6.2, so I wouldn't expect to see `Skipping repository check due to configured frequency` in your logs unless you're running borgmatic 1.6.2+. Assuming you've got a newer version of borgmatic, here's the [documented behavior](https://torsion.org/borgmatic/docs/how-to/deal-with-very-large-backups/#consistency-check-configuration): > By default, if you omit consistency checks from configuration, borgmatic runs full-repository checks (`repository`) and per-archive checks (`archives`) within each repository, no more than once a month. So since you've got the consistency check frequency commented out from your configuration, borgmatic is defaulting to running checks once a month. This is an intentional change in the default from old versions of borgmatic! What if you want the old behavior? You can simply configure your desired checks in configuration with a frequency of `always`. Or, if you just want to run checks as a one-off, ignoring the configured/default frequency: `borgmatic check --force`. Since I think all this isn't 100% clear in the documentation, I'll try to clarify this behavior!
witten added the
question / support
label 2023-03-17 16:56:27 +00:00
Author

Thank you, both for the explanation and the nod to the doc :-) I'll take a look at the config in the morning. And yes, I'm running 1.5.20

sudo borgmatic --version
/usr/lib/python3/dist-packages/pkg_resources/init.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
1.5.20

Thank you, both for the explanation and the nod to the doc :-) I'll take a look at the config in the morning. And yes, I'm running 1.5.20 sudo borgmatic --version /usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release warnings.warn( 1.5.20
Owner

Huh, that's really odd with the borgmatic version. I'm not sure what's going on there. Maybe you have two different versions of borgmatic installed...

Huh, that's really odd with the borgmatic version. I'm not sure what's going on there. Maybe you have two different versions of borgmatic installed...
Author

Thank you, that seems to be the problem. I initially installed borgmatic using pip, some years ago. Recently I saw an upgrade available in Synaptic, and upgraded. Python has details of both 1.5.20 and 1.7.8:

~$ pip list | grep borgmatic
borgmatic              1.5.20
~$

~$ pip show -f borgmatic
Name: borgmatic
Version: 1.5.20

~# pip show -f borgmatic
Name: borgmatic
Version: 1.7.8

What's the best way to sort this so my repositories remain available? Can I simply uninstall both pip and dpkg versions, and then start again with one of them, using my existing config yaml files? The attachments show what's listed as installed by both methods.

I thank you for your time helping me, and for a superb product.

Edit: I'd prefer the 1.5.20 version in Mint's repo, because that has the behaviour I want.
Edit 2: Installation was some years ago, and I hadn't touched it since. I rarely use pip, and forgot that's how I installed it.

Thank you, that seems to be the problem. I initially installed borgmatic using pip, some years ago. Recently I saw an upgrade available in Synaptic, and upgraded. Python has details of both 1.5.20 and 1.7.8: ``` ~$ pip list | grep borgmatic borgmatic 1.5.20 ~$ ~$ pip show -f borgmatic Name: borgmatic Version: 1.5.20 ~# pip show -f borgmatic Name: borgmatic Version: 1.7.8 ``` What's the best way to sort this so my repositories remain available? Can I simply uninstall both pip and dpkg versions, and then start again with one of them, using my existing config yaml files? The attachments show what's listed as installed by both methods. I thank you for your time helping me, and for a superb product. Edit: I'd prefer the 1.5.20 version in Mint's repo, because that has the behaviour I want. Edit 2: Installation was some years ago, and I hadn't touched it since. I rarely use pip, and forgot that's how I installed it.
Owner

Given that your configuration files have all the newest configuration syntax, you could very well uninstall all versions of borgmatic and reinstall 1.7.8+. But you wouldn't be able to uninstall and then reinstall/use 1.5.20 without altering your configuration file. In particular, you'd have to change the consistency checks back to the old style of configuration. And you may have to make other changes as well depending on the contents of your configuration. Hope that helps!

Given that your configuration files have all the newest configuration syntax, you could very well uninstall all versions of borgmatic and reinstall 1.7.8+. But you wouldn't be able to uninstall and then reinstall/use 1.5.20 without altering your configuration file. In particular, you'd have to change the consistency checks back to the [old style of configuration](https://torsion.org/borgmatic/docs/how-to/deal-with-very-large-backups/#consistency-check-configuration). And you may have to make other changes as well depending on the contents of your configuration. Hope that helps!
Author

Thanks, that's great. I kept all the original, pre-update configs, updating just one under a different name. I'll give the Mint repo route a try.

Very best wishes.

Thanks, that's great. I kept all the original, pre-update configs, updating just one under a different name. I'll give the Mint repo route a try. Very best wishes.
Owner

Sounds good!

Sounds good!
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#653
No description provided.