How to delete everything in a archive except a folder #7204
-
How can I delete everything in an archive except a folder name |
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
It's correct that archive content can not be modified after the archive is created.
But, it is possible to run
borg recreate
with 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.