[Box Backup] Confusion with Regex

Tobias Roth boxbackup@fluffy.co.uk
Sat, 10 May 2008 12:47:20 +0200


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