Q: Spot check schedule with config.yml & requesting clarification of spot check parameters #868
Reference in New Issue
Block a user
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
I want to confirm
spotchecks are working as intended. I am defining how to runspotchecks insideconfig.yml. Once a month it should spot check an archive. Given issue #866 I am seeing an error occur due toxxh64sumwhich sends me afailalert; however, new archives are still being created on my remote repo. Is this the expected behavior?I already restarted the container and lost the current log information but I recall seeing the output of
--statsin the logs before thexxh6sumerror which added to the fact I have new archives in my repo means an archive is created then checks are run which is counter to the documentation which says to runspotcheck on a separate schedule tocreate. Is this expected behavior too or should I manually addspotcheck to mycrontab.txtinstead?Also for clarification here is an example spot check.
My second question is to clarify the meaning of the parameters as I find it a little unclear to me. If I have 1000 files, 100 files will be spot checked and from that 100 if 5 files are found to be different the check will fail? Is that the correct way to read this? In addition if there is more than a 10% change in the total number of files the check will fail given
count_tolerance_percentage?Steps to reproduce
No response
Actual behavior
No response
Expected behavior
No response
Other notes / implementation ideas
No response
borgmatic version
1.8.11
borgmatic installation method
container
Borg version
1.2.8
Python version
3.12.3
Database version (if applicable)
mysql Ver 15.1 Distrib 10.11.6-MariaDB, for Linux (x86_64) using readline 5.1
Operating system and version
Alpine 3.19
Yes. The
createandcheckactions are run independently, andcreatecomes beforecheckby default. So if thecreatesucceeds and thecheckfails, a new archive will still be created. This applies to all checks, not just the spot check.Yeah, by default
createruns beforecheckby default, and that is expected behavior. The documentation (which perhaps needs clarification!) suggests that it may make more sense to run the spot check in particular on a separate schedule so that it's not simply checking that the archive that was just created has the exact same files that were just put into it. There is some value in doing that, because it could catch files modified during backup or even bugs in archive creation within Borg itself. (Also see #656 which has more about a use case where running a spot check immediately after acreateis actually useful.) But there may be more value in running the spot check on a separate schedule from thecreate, so that, for instance, it can actually detect unwanted drift / major changes between backed up archives and files on disk. It really depends what you want to get out of the check.However given that this is all beta and very new, I'm open to: 1. Suggestions on ways of clarifying this documentation, and 2. Maybe changing the recommendation altogether if it doesn't really make sense for common use cases.
That is all correct!
I'm closing this due to inactivity, but please feel free to file a new ticket if you still have questions.