Add Borg 2.0.0b17 features #1098
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 assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
borgmatic-collective/borgmatic#1098
Loading…
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'd like to do and why
Support relevant Borg 2.0.0b17 features and changes natively in borgmatic:
createandrecreateactions (which already have--chunker-params) for inspiration.listflags/options for inspiration.Other notes / implementation ideas
No response
I thought I'd look into getting the no-delete permission to work with my setup but of course nothing is ever simple :)
The borg rename command needs delete permission, consequently borgmatic create doesn't work due to the way streaming process failures are handled (the archive is created with a suffix and renamed upon success).
I'm already using a pull model to prune and compact so having it do the create as well is trivial, but I'd rather let the client initiate its own backups.
Is there any other way to deal with failed streams without using rename?
Ugh, that's obnoxious! When designing the solution for dealing with failed database dumps, we looked at a bunch of other options, but the rename approach was the only one that ended up panning out in the end. See #1032 if you're interested in the full history.
In terms of how to proceed with this ticket, I think my inclination is for borgmatic to not do the checkpoint + rename whenever
no-deleteis enabled.Not doing the checkpoint would work but the problem of pruning good archives in favor of bad ones would still exist. I would at least need to know when a stream fails so I could deal with it manually somehow. I also wonder if rename really needs the delete permission but that's way above my pay grade
Seems like the magic pipe solution might still be viable and almost working? I'm already neck deep on a tangent, but once I get some free cycles I might give that a go if no one beats me to it
Yeah, fortunately borgmatic does error when a database stream fails—it just won't cleanup the partial archive if that checkpoint/rename feature is disabled.
Mine too. 😄 You could ask in the #borgbackup IRC channel on libera.chat on you could file a Borg issue/discussion about it.
The sentinel named pipe? IIRC, I wasn't actually able to get that approach working in prototyping. You're welcome to try again, but it might just be easier to deal with the occasional partial archives since you should find out when such errors occur.
I assumed they were all the same thing, but the OP of #1032 attempted a FIFO pipe solution and I got the impression it might still be feasible even though I'm a pessimist.
But yes, much easier to just disable it and deal with the errors. I guess I just need to figure out how to tell if no_delete is set
Yup, the sentinel named pipe / FIFO pipe solution is all the same thing. Maybe it's feasible, but yeah it would take some more poking to find out.
So I'm assuming
BORG_REPO_PERMISSIONSwould be represented in borgmatic with a configuration file option. If that's the case, then it might be as easy as checking thatconfig.get('borg_repo_permissions') == 'no-delete'or whatever, assuming that the configuration has already been loaded into an availableconfigdict (which is the case almost everywhere in borgmatic).TY for the mention on #1032 @witten. Just drawing your attention to:
#1032 (comment)
IMHO the sentinel named pipe solution is prone to deadlocking between borg / borgmatic (but that's just a gut feeling).