check_last option is ignored when data consistency checks are enabled, even though data implies archives #611
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#611
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
I want to only check the last 14 archives during my consistency checks, to save time. It is exceedingly rare that I will need to dip into archives older than that, so I'm willing to accept the risk of not checking them. However, the
check_last
option is being ignored in my case because I don't specifyarchives
checks, but because I dodata
checks, I actually do perform the archive checks, resulting in my runs checking all the archives every time.Steps to reproduce (if a bug)
This is the relevant part of my actual config that is experiencing this problem:
Actual behavior (if a bug)
Log result:
And then later on, we can see more than 14 archives are checked (I'll just show the last 2 lines, since the total numbers make it obvious it's more than 14):
Expected behavior (if a bug)
I expected that it would not log something like this, and would only check the last 14 archives.
Other notes / implementation ideas
The reason for my expectation is that I read, from the sample config output, the following comment above the check names:
As well as the following comment above the
check_last
option:I'm new to both borg and borgmatic, so I don't know for sure if this is a bug or just an unintuitive/poorly documented interface. I am not sure whether I should add
archives
to the consistency checks or not, since I thought that would be redundant withdata
. If this is not a bug, then I'd appreciate some advice on what I should change about my config, as well as an update to the documentation to help prevent others from similar confusion.Environment
borgmatic version: 1.7.4
borgmatic installation method: homebrew
Borg version: 1.2.2
Python version: 3.6.7
Database version (if applicable): n/a
operating system and version: macOS 12.6
(using Automator and a calendar event to run borgmatic nightly.)
Thanks for taking the time to file this and explain the problem. What you've outlined here seems like a reasonable user expectation. Looking at the code, it should be a pretty easy change to make
check_last
apply when adata
consistency check is present (andarchives
is only implied).This has been fixed in master and will be part of the next release. I also fixed the consistency
prefix
option to work when only adata
consistency check is present. Thanks again for filing this!Just released in borgmatic 1.7.5!
I upgraded yesterday and ran my backups; I no longer see this message:
However, it's still analyzing more archives than it should be. I still have
check_last
set to 14, but it analyzed 16 archives. Is this a new bug, or the same one, just not finished?Would it be possible to run borgmatic with
--verbosity 2
and look for the actualborg check
command that's invoked? Does that include the--last
flag? Thanks.My apologies, I had 1.7.4 on the machine that experienced this, but thought I had 1.7.5. When you released 1.7.5, the homebrew formula hadn't yet updated, and I just did
brew upgrade
without paying attention to the actual version number. And I simply missed the INFO message when reading the logs, precisely because since the day I upgraded, I also changed my automation to use--verbosity 2
and that message occurred way earlier than I was expecting. Please disregard my above message. I've definitely got the right version now. If the problem recurs, I'll report back with theborg check
command. Sorry again about that!Phew, no worries!