Is --max-duration
for checks supported by YAML already? #506
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#506
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'm running repo checks by default using
repository
andarchives
, because those checks seemed to have fit pretty well into my backup time window in the past. Though, some days ago this wasn't the case anymore and checking operations which according to former logs took only e.g. 5 minutes, required around 45 minutes now.Of course this doesn't have anything to do with BORG or BORGMATIC, but instead I'm backing up to some NAS-like device provided by my hoster. The provider doesn't guarantee any performance and most likely changed/did something for some reason, resulting in temporarily bad performance. Things seem to be better now.
The point is, that while I would like to have as much checks as possible, backing up the individual data of all systems is more important of course. Because multiple backups are run one after another only when the former has finished, exceptionally long running checks make things difficult.
That's where --max-duration comes into play, even though it supports slightly different checks only. Though, I can't see
--max-duration
in the YAML structure forconsistency
.So, is it supported already and I need to upgrade BORGMATIC or isn't it supported currently and I need to use it in
extra_borg_options/check
instead? In the latter case, would you consider supporting it forconsistency
?Thanks!
Environment
borgmatic version: 1.5.15
borgmatic installation method: PIP, system wide
Borg version: 1.1.16
Python version: 3.8.10
operating system and version: Ubuntu 20.04
It's supported by borgmatic, but currently it's only at the command-line level rather than the configuration level. E.g., you can do
borgmatic check --max-duration
. I think your idea of adding it as an option to theconsistency
section of borgmatic's configuration file makes sense as well! (Implementation note: If max duration is specified in both the configuration file and on the command-line, the command-line value should take precedence.) In the meantime, you can use the command-line work-around. Thanks for filing this!Hi, thanks for your great work. I just wanted to report that this does not seem to work for me with borg 1.2.0 and borgmatic 1.5.24. Is it on another branch?
/root/.local/bin/borgmatic check --verbosity 2 --syslog-verbosity 2 --max-duration=3600
Also, I think it would be very nice to have this in the config file as you were saying as I have a big repository and checking over SSH in a stable way becomes tricky as connection needs to be maintained for more than 20 hours.
My mistake. For some reason I thought it was already implemented as a command-line flag! Looks like it's not. Agreed that it would make sense in the config file instead! As an interim as a work-around, you could add it to
check
under theextra_borg_options
in the configuration file. Example:Many thanks for the help @witten. It actually works, as the option is correctly present in the command line but (because of borg) it needs to set a lot other very specific options: it needs
--repository-only
and this in turn is not compatible with--first
,--last
,--prefix
and--verify-data
arguments . So in short, I think this would require a dedicated command for the time being (outside of borgmatic). There seems not to be an easy solution to do repository and archives checks together as repository check can have--max-duration
but archive check cannot.Mind that the correct option is
--max-duration
, just for reference.Many thanks again for the quick and nice help.
PS: Of course you can do it in two steps in borgmatic and include the option only in the repository check.
Thanks for pointing this out. Certainly seems like a candidate for a borgmatic option then.. borgmatic could apply the logic to add
--max-duration
only when--repository-only
is implied.. or just to error if that's not the case.While there's no
--max-duration
support yet, you may be interested in the related ticket #523, which allows you to run checks at a configured frequency rather than running them all the time. The documentation for that (not yet released) feature is here: https://torsion.org/borgmatic/docs/how-to/deal-with-very-large-backups/#check-frequency