Veritas-bu

[Veritas-bu] Exclude list question

2001-01-12 19:24:25
Subject: [Veritas-bu] Exclude list question
From: KevinB AT paccessglobal DOT com KevinB AT paccessglobal DOT com
Date: Fri, 12 Jan 2001 16:24:25 -0800
Very good description, I will keep this.  Even though I use both regularly I
still confuse the use of the * frequently.  

Jason, 

use

*.dbf

NB will exclude all files ending in .dbf in any location.  Similar to your
entry of *.o will exclude all files ending .o or putting core in the exclude
list will skip all core files in any directories. 

-----Original Message-----
From: W. Curtis Preston [mailto:curtis AT colltech DOT com]
Sent: Friday, January 12, 2001 2:21 AM
To: David A. Chapa; Jason Ahrens
Cc: Veritas NBU
Subject: Re: [Veritas-bu] Exclude list question


David,

Your pattern is right, but your "rule of thumb" is not.  These are NOT 
regular expressions.  This is shell expansion syntax.  Shell expansion 
syntax is what you pass to 'ls' and 'find.'  Regular expressions are what 
you pass to 'grep.'

Here are some commands that will illustrate that they are completely 
different beasts:

$ ls oradata/*/*/*dbf
oradata/level1/level2/data.dbf

$ ls oradata/*/*/*dbf | grep 'oradata/*/*/*dbf'
(nothing found)

$ ls oradata/*/*/dbf| grep 'oradata/.*/.*/.*dbf'
oradata/level1/level2/data.dbf

$ ls oradata/.*/.*/.*dbf
(nothing found)

Why the above makes sense:

In shell expansion syntax, '*' means "any pattern."
In regular expression syntax, '*' means "0 or more occurences of the 
character immediately preceding the star."  Therefore, /*dbf means: "A 
slash, or no slashes, or multiple slashes, followed by 'dbf'"

In shell expansion syntax, a '.' means a period.
In regular expression syntax, a '.' means any single character.  Therefore, 
'.*' is the regular expression equivalent of the shell "*".  That is 
because it means "any character, no characters, or multiple characters."

I wish I could use regular expression in exclude lists, but they are very 
complicated, and Veritas probably did the wise thing by going for the 
simpler shell expansion syntax.  (I wish I could do it optionally, though.)
;)

At 08:24 AM 12/21/00 -0800, David A. Chapa wrote:
>Well actually in your case, it should probably read
>like this
>
>oradata/*/*/*dbf
>
>*dbf will natually exclude all of the files ending in
>dbf.
>
>My Rule of Thumb:
>These are basically regular expressions, so if you
>couldn't use it in a find or ls or whatever else you
>could pass a regular expression to, then it won't work
>in the exclude list (with some exceptions, I'm sure).
>
>The more you understand regular expressions the more
>flexible the product becomes.
>
>David
>
>Quoting Jason Ahrens <ahrensj AT psi DOT ca>:
>
> > Running NetBackup 3.2, solaris server/clients.
> >
> > I have an exclude list on the client 'hawk' which
>states:
> > hawk:/[1]# cat /usr/openv/netbackup/exclude_list
> > #Standard excludes core
> > *.o
> > /tmp
> > /proc
> > /cdrom
> > lost+found
> > #We do not want to backup .dbf files. Live oracle
>databases
> > oradata/dbf
> >
> > According to information I saw posted here, this
>should include all dbf
> > files under any level of depth under any oradata
>directory on the system.
> >
> > (ie: /u01/oradata/level1/level2/data.dbf should be
>excluded)
> > This doesn't seem to be the case. I checked the
>results of my backup and
> > found all the dbf files backed up. As apparently I
>have an issue with the
> > pattern.
> >
> > Perhaps oradata/*.dbf would work?
> >
> > The issue is, I do not want to grab the live
>databases (*.dbf) *anwhere*
> > at any depth bellow any directory that is named
>oradata (ie: regex
> > 'oradata/.*/\*\.dbf' should be excluded)
> >
> > Thanks
> > Jason
> >
> > --
> > Jason Ahrens
> > PSINet Limited
> > "The Internet Super Carrier"
> > (613) 780-2288
> > (613) 780-2200 x3368
> >
> >
> > _______________________________________________
> > Veritas-bu maillist  -  Veritas-
>bu AT mailman.eng.auburn DOT edu
> >
>http://mailman.eng.auburn.edu/mailman/listinfo/veritas-
>bu
> >
>
>
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>David A. Chapa
>Consulting Manager
>DataStaff, Inc.
>847 413 1144
>_______________________________________________
>Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
>http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu

---
W. Curtis Preston, Principal Consultant at Collective Technologies
Email: curtis AT colltech DOT com                (Best way to contact me)
Work : 408 452 5555                       (Leave a message.)
Pager: 800 946 4646, pin#1436065        (If urgent.)

Tap into the Collective Intellect (TM): http://www.colltech.com
Backup & Restore resources:        http://www.backupcentral.com

_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu



<Prev in Thread] Current Thread [Next in Thread>