[Box Backup] Confusion with Regex

Tobias Roth boxbackup at fluffy.co.uk
Sat May 10 11:47:20 BST 2008


Hi

I'm confused about the usage of regular expressions in the Exclude
lines. The website says to look at re_format(7) and mentiones this example:

ExcludeFilesRegex = *.(mp3|MP3)\$

But according to re_format(7), this is not a valid regular expression,
because the * needs to be preceeded by an atom (also, why is the $ sign
escaped? If it signifies end-of-line, it shouldn't be). And boxbackup
confirms this, I get an error if I use:

ExcludeFilesRegex = *


So, the following seems to work:

	ExcludeFilesRegex = .*
	ExcludeDirsRegex = .*
	AlwaysIncludeFile = /boot/loader.conf
	AlwaysIncludeDir = /boot/profile
	AlwaysIncludeFilesRegex = /boot/profile/.*

It backs up /boot/loader.conf and everything in dir /boot/profile/


Now, I would like to do something else: Include all files except those
with a filename beginning with a dot.

How would the exclude line look for that? ExcludeFilesRegex = ^\..*
doesn't seem to work, it still includes all hidden files.


Thanks,
Tobias






More information about the Boxbackup mailing list