borgbackup / borg

Deduplicating archiver with compression and authenticated encryption.
https://www.borgbackup.org/
Other
10.77k stars 735 forks source link

Add support for pattern prefix for the whole file with --exclude-from #1613

Open blueyed opened 7 years ago

blueyed commented 7 years ago

Given that you have a list of regular expression patterns already (e.g. used with "bup"), it would be helpful if --exclude-from re:/etc/backup-exclude-bup.txt would work, i.e. consider all patterns in the file to have a re: prefix.

I've used the following Vim commands to convert the list manually:

:%s/^\ze[^#]/re:/gc
" borg does not like a / at the end before $ to exclude dirs?!
:%s~/\$~\$~gc
ThomasWaldmann commented 7 years ago

something similar was recently added for the new --patterns-from, one can switch the pattern style within the file.