Running checks on a repo asynchronously from backup to another repo? #291
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#291
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 have one borgmatic file with two remote SSH repositories. It does backup and check repositories consistency, on each repo. Can the consistency check of the first repository occurs in parallel with the backup to the second repository? This would make the whole process faster.
Currently, the steps are:
I takes 9 hours sequentially.
It would take only 6 hours if C and D are started without waiting for B to finish.
Because B's workload is server-side, C and D's speed would not be affected.
A poor-man's way would be to have separate borgmatic files for each step, and handle the parallelization externally.
Thanks for any idea!
Thanks for filing this! Adding this sort of parallelization to borgmatic would probably require: 1. Managing a pool of processes that could end at various times, 2. Somehow unifying all of the log output of the various processes, even though they might be interspersed, and 3. Potentially dealing with dependencies between processes (writing to the same repository, etc). It's certainly not out of the question, but it sounds like a fair amount of investment.
So my first instinct is to dig into the checks that are taking a while. Have you looked at tweaking the specific checks you're running to perhaps reduce the total runtime? Or, have you considered invoking checks as a separate scheduled job from your backups? That way, with checks decoupled from backups, you could run each at a different time, or even run checks on a less frequent schedule.
Related ticket: witten/borgmatic#227
Thanks Dan! Adding 1+2+3 seems absolutely insane, I agree. Better do one thing and do it well. The "A la carte" command line options in spearate cronjob is what is needed for this use case, thank you!
As to tweaking the checks themselves, already done, sticking only to the lightest
repository
checks: the remote server is just a cow. I've contacted the provider to see what can be done on their end.Closing this ticket since the separate scheduled jobs with command line options do the trick :)
Thanks!
Glad to hear the separate jobs sound like they'll work out for you! Please continue to file tickets for anything that can be improved.