spot check fails due to config files not in patterns #1133
Labels
No labels
blocked
breaking
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
borgmatic-collective/borgmatic#1133
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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
Hi all!
I'm playing around a little trying to figure out the various configurations but I cannot figure out how to make the spot check work when the configurations are backed up for bootstrap, as those files are not ignored and therefore detected as a difference.
Of course, doing
or manually adding the config files among the source files solves the problem, but I'd love to backup the configurations in a transparent fashion so that I can seamlessly change the files included in my configs.
Should I manually add the config files to the source files/patterns or should those files be automatically ignored like the
manifest.jsonitself?Steps to reproduce
Here's a snippet of the confgurations:
And here's the tree of input files
Actual behavior
Here are the logs of the check
and here the full content of the archive
Expected behavior
I'd expect config files to be backed up, but ignored during spot check, just like the file
manifest.json, so it passes with 0% file count delta.Other notes / implementation ideas
Other note:
I'm executing borgmatic as root, backing up files from the user
alessio.Implementation idea:
Could it be a possible solution maybe to merge the content of the
manifest.json(namely the arrayconfig_paths) to the temp file containing the patterns (/tmp/borgmatic-bgv3z8qc/borgmatic/tmplk83h_6o) before callingborg create --patterns-from ... --dry-run?borgmatic version
2.0.7
borgmatic installation method
pipx install
Borg version
borg 1.4.1
Python version
Python 3.12.3
Database version (if applicable)
No response
Operating system and version
Ubuntu 24.04.3 LTS
So, I'm dealing with similar problems about the spot check failing, but my math comes out such that it seems that neither
manifest.jsonnor the config file are being ignored. I think the same is the case for you too, right? If only the config file was not ignored, then you couldn't get 16.7% for the file count delta, since you have 13 archive entries. Even if the directory entries in the archive are ignored (which honestly would make sense to do) then that would be only ~9% difference. Maybe I'm just misunderstanding how the math works out, though.I figured I'd comment to make sure that no aspect of this gets overlooked, because right now it's really frustrating that there's no way to do a good backup and a good spot check at the same time, you either have to forgo the bootstrap functionality or allow for more
count_tolerance_percentagethan what you would ideally like...Zero tolerances. Bold. 😄
I recognize the issue you're pointing out with configuration files that get automatically stored in an archive (to support
bootstrap) getting used for spot check comparisons—when those configuration files don't exist in the source directories.Yeah, something like this might be the way to go. Because I don't think I can omit the configuration files from the list of archive paths to spot check, as a user might legitimately include their configuration files from their listed source directories. But adding the configuration files to the list of source paths to spot check (when bootstrapping is enabled) might work.
In terms of the math, be aware that: 1. Yes, directories are ignored, and 2. Anything in borgmatic's runtime directory is ignored. So there should be way fewer than 13 archive entries in this case. I'm counting 7 including the config file. And 6 in the source directories.
And here's the code that produced that 16.67%:
So I think that's
abs(6 - 7) / 6 * 100 = 16.67%I've got an initial attempt at a fix here: #1143. Still needs automated test work.
Okay, this is now implemented in main and will be part of the next release. Thanks for filing it!
Released in borgmatic 2.0.8!