do checks only every n-th run #18
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#18
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?
It would be nice if one could configure borgmatic to e.g. check the repository every time, but do the lengthy archive-checks only every n-th time, or every week or s.th. like that.
Imported from Taiga issue 17 (done). Created on 2016-03-16T17:39:04+0000 by Stefan L.
That's a great idea. It would require storing a little state about how far along until the next check, but that could happen.
Comment on 2016-04-10T22:31:38+0000 by Dan Helfman.
I also would like to see some options around checks. I want to be able to do fast backups through the week and check them once a week. Any added flexibility around this option would be great. As for state a simple sqlite db could be ideal.
Comment on 2016-06-09T17:33:31+0000 by Dennis Roberts.
Another interesting idea: In https://tree.taiga.io/project/witten-borgmatic/issue/30 Markus Hubig suggested a borgmatic "check only" mode that would allow you to separately run borgmatic from cron / your job scheduler, just to do checks. That way, you could run checks at whatever frequency you wanted.
To make this useful, we'd also need an "exclude checks" flag or similar for the normal mode.
Thoughts on that approach, versus the request in this ticket?
Comment on 2017-07-29T03:44:52+0000 by Dan Helfman.
That would work for my purpose just fine.
Comment on 2017-07-29T03:53:33+0000 by Dennis Roberts.
Okay, just released borgmatic 1.1.4 with three new flags: "--prune", "--create", and "--check".
So you can configure one cron/Jenkins job with "--prune --create" and a separate job with a different frequency with just "--check". Or mix and match those flags how ever you like.
Comment on 2017-07-29T05:07:39+0000 by Dan Helfman.
I should have stated exactly what I do now:
borg check -v --last 7 borg@borgserver:repo and then I do borg extract -v --dry-run --list borg@borgserver:repo::last_archive
The check you know just does a high level verification.
The extract dry-run actually reads each file into memory and verifies its consistency - this is the only way to check for bit rot without doing a real restore.
So I guess my ask is that the --check option can be configured via the configuration file on what exactly to do.
EDIT: When I first wanted this feature originally I wasn't aware of the extract dry-run option
Comment on 2017-07-29T05:16:48+0000 by Dennis Roberts.
There's already a check_last option in the borgmatic config file, so the check portion should already be possible. I can look into optionally adding the dry-run portion though. Filed as #35.
Comment on 2017-07-29T05:22:56+0000 by Dan Helfman.
Okay, just released borgmatic 1.1.5 with a new optional "extract" check in the consistency section of configuration. That should handle your dry-run use case.
Comment on 2017-07-30T18:20:00+0000 by Dan Helfman.