Repository navigation
How to delete everything in a archive except a folder #7204
|
How can I delete everything in an archive except a folder name |
Answered by
ThomasWaldmann
Dec 13, 2022
Replies: 2 comments 1 reply
|
This is not possible. You can read more about archive here https://borgbackup.readthedocs.io/en/stable/internals/data-structures.html#archives. This help you to understand why. |
0 replies
|
It's correct that archive content can not be modified after the archive is created. But, it is possible to run Using --list --dry-run or keeping the original archive is strongly recommended until you are pretty sure it only removed the stuff you wanted to remove. |
1 reply
Answer selected by
blueray453
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's correct that archive content can not be modified after the archive is created.
But, it is possible to run
borg recreatewith patterns including only the stuff that shall remain and excluding everything else.In that case, a new archive will be created (and the old one deleted, except if you use the option not to do that).
Using --list --dry-run or keeping the original archive is strongly recommended until you are pretty sure it only removed the stuff you wanted to remove.