Re: need regex help
2006-08-24 12:41:45
Jon LaBadie wrote:
> On Thu, Aug 24, 2006 at 10:40:15AM -0400, Jeff Portwine wrote:
>> I want amanda to back up multiple home directories, but I don't want to back
>> up everything in /home.
>> I tried using syntax like this:
>>
>> myserver /dev/sdc1 {
>> server-user-tar
>> include "./home/(user1|user2|user3|user4)*"
>> }
>>
>
> I don't think the string argument to include/exclude
> are "regex" (regular expression) patterns. I believe
> they are shell globbing (or file name generation) patterns.
> Thus the parentheses and pipe symbol are taken as literal.
>
> Is the mount point of /dev/sdc1 "/" or is it "/home".
> If the latter, then your "." in the pattern is already "home".
>
> You might try something like:
>
> myserver HOME-grp1 /home {
> server-user-tar
> include file ./user1*
> include file append ./user2*
> include file append ./user3*
> include file append ./user4*
> }
>
> And though I've not done it, I think the include multiple strings
> can be given on the same line:
>
> myserver HOME-grp1 /home {
> server-user-tar
> include file ./user1* ./user2*
> include file append ./user3* ./user4*
> }
>
You can also just use separate DLEs.
As an added bonus, it gives Amanda more pieces to rearrange to
level out daily tape usage. It may not be practical with hundreds
of directories, but 9 isn't very many to add, and is less likely
to have unexpected results as your directory structure changes
over time than wildcarded names.
Frank
--
Frank Smith fsmith AT hoovers DOT com
Sr. Systems Administrator Voice: 512-374-4673
Hoover's Online Fax: 512-374-4501
|
|
|