Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

an option to btrfs-restore exclude paths matching a pattern (e.g., Trash) #12

Open
imz opened this issue Feb 5, 2013 · 3 comments
Open

Comments

@imz
Copy link

imz commented Feb 5, 2013

(I first wrote this wish down at https://btrfs.wiki.kernel.org/index.php/Talk:Restore.)

I'm thinking how to exclude paths like .Trash from restoring with a regex.

So, POSIX Extended Regular Expressions are used here. (Which don't have a syntax for the wanted complement operation.)

he simplest solution must be to patch the C code to implement an option like grep's -v (or --invert-match): "Invert the sense of matching, to select non-matching lines." (But "-v" has already been taken as an option of btrfs-restore...) Combining inclusion and exclusion patterns is more complex; which one should take precedence is not a clear thing; ideally, a language like that of "find" should be implemented for matching, but that's too much work. (As for me personally, I'm simply interested in excluding trash directories, and that's achievable with the simplest inversion option.)

Exclusion could be done by a variant of the -m switch, say, -M.

@imz
Copy link
Author

imz commented Dec 12, 2013

Also reported at https://bugzilla.kernel.org/show_bug.cgi?id=66911 .

Anothe idea: an interactive mode asking for more inclusion and exclusion patterns as new paths are discovered.

@ssorgatem
Copy link

So no way to exclude paths yet?

@suvl
Copy link

suvl commented Nov 3, 2021

really? 8y later still no fix for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants