Feature request: Support for borg --strip-components argument #324
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#324
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 want to apply the borg --strip-components argument when extracting from borg archive, in order to remove the leading path arguments from the extracted files
This is useful when the backup has archived from the root but I want to extract a subdirectory to a specific location (but as a top-level-directory in that location)
See https://borgbackup.readthedocs.io/en/stable/usage/extract.html
Seems like a reasonable flag to add! I assume you're aware of the existing
borgmatic extract --destination
flag, but you still need/want--strip-components
to further manipulate the extracted path?Yes I am aware of it and want to use them in combination.
For example, if the backup contains home/claes/.bashrc (because it is backed up from /), and I want to extract .bashrc into a specific directory, then I specify that directory with --destination, but I also want to supply --strip-components 2 so it does not extract it as home/claes/.bashrc, only as .bashrc.
I currently do this with borg directly but it would be good if I could do it with borgmatic as it packages all configuration around a backup and its keys etc so nicely.
Makes sense! Thanks for the explanation.
Seems I closed it by mistake, I am reopening if it is ok
Yup, no worries!
This is implemented now in master, and it'll be released shortly!
Okay, this is released in borgmatic 1.5.6. Thanks for the suggestion!
Thanks a lot!!