[Comm] Bacula и regex | wild в наборе файлов
Rinat Shigapov
srk на nevod.ru
Пн Янв 18 17:10:08 UTC 2010
Привожу отрывок из документации:
Now, lets assume you only want to backup .Z and .gz files and nothing
else. This is a bit trickier because Bacula by default will select
everything to backup, so we must exclude everything but .Z and .gz
files. If we take the first example above and make the obvious
modifications to it, we might come up with a FileSet that looks like this:
FileSet {
Name = "Full Set"
Include { !!!!!!!!!!!!
Options { This
wildfile = "*.Z" example
wildfile = "*.gz" doesn't
work
} !!!!!!!!!!!!
File = /myfile
}
}
The *.Z and *.gz files will indeed be backed up, but all other files
that are not matched by the Options directives will automatically be
backed up too (i.e. that is the default rule).
To accomplish what we want, we must explicitly exclude all other files.
We do this with the following:
FileSet {
Name = "Full Set"
Include {
Options {
wildfile = "*.Z"
wildfile = "*.gz"
}
Options {
Exclude = yes
RegexFile = ".*"
}
File = /myfile
}
}
The "trick" here was to add a RegexFile expression that matches all
files. It does not match directory names, so all directories in /myfile
will be backed up (the directory entry) and any *.Z and *.gz files
contained in them. If you know that certain directories do not contain
any *.Z or *.gz files and you do not want the directory entries backed
up, you will need to explicitly exclude those directories. Backing up a
directory entries is not very expensive.
--
С уважением,
инженер-программист ООО "Невод"
Ринат Шигапов
Jabber ID: dxist эт ya.ru
Подробная информация о списке рассылки community