Run arbitrary Borg commands #425
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#425
Loading…
Reference in New Issue
Block a user
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'm trying to do and why
An oft-mentioned feature request is the ability for borgmatic to run Borg commands with arbitrary arguments.
The "why" is that borgmatic actions do not currently wrap all current or future Borg commands/options. (See #394 for an example.) So sometimes it would be nice to drop down to running Borg (nearly) directly while still making use of all the niceties of borgmatic's configuration with repositories, SSH settings, etc.
Proposed design
There could be a new "borg" action something like this:
Which would run a borg command like:
Whereas this:
Would run a borg command like:
Unlike all other borgmatic actions that can share options, this action would work by "greedily" consuming any Borg arguments following "borg" and not share them with other borgmatic actions. Global borgmatic options could still go before the "borg" action.
When running the given Borg command, repository name (and archive name, where applicable) would be constructed entirely by borgmatic to take advantage of its
repositories
listed in configuration. This means that repository/archive names should not be specified as part of the supplied Borg options.Help for the new action might look something like this:
Released in borgmatic 1.5.15! Docs here: https://torsion.org/borgmatic/docs/how-to/run-arbitrary-borg-commands/
thank you very very much, thos will save me a lot of time. ☺
I'm so glad to hear it! Since there are several limitations with the new action (see the docs), please let me know if any of them prove problematic for your use cases. I wanted to optimize for speed rather than "perfect".