Remove all files and folders except a directory from a particular archive #8254
-
I want to remove all files and folders except I checked #686 and the command I came up with is:
The
Is it right or am i missing something. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Use Then dry-run recreate and you'll see whether it works. If it doesn't, also check the patterns doc page. |
Beta Was this translation helpful? Give feedback.
-
Ehrm, for the The patterns file might be right with the leading slash removed, just try it with --list --dry-run. |
Beta Was this translation helpful? Give feedback.
-
Here is the pattern file:
When i run:
It gives me:
https://borgbackup.readthedocs.io/en/stable/usage/create.html says:
In the context of recreate what does x and - mean? |
Beta Was this translation helpful? Give feedback.
Ehrm, for the
R
(root paths), you need to give a valid path. Using a relative path there might work if the cwd is right (in your case cwd ==/
, I guess), but giving an absolute path there is less prone to break.The patterns file might be right with the leading slash removed, just try it with --list --dry-run.