I noticed this from the 7.3 documentation in the nmc which is an improvement
over the old online help.....
File Matching with Multiple ASMs in a Directive
When a file matches multiple ASMs in a directive, the action taken on
the file depends on the order
of the ASMs in the directive. For example, if the following two ASMs
are listed in a directive:
+always: master.mdf master.ldf
+skip *.mdf *.ldf
Then the master.mdf and the master.ldf files will be backed up because
the always ASM is processed first.
All other files with a .mdf or .ldf extension will not be backed up.
However, if the order of the ASMs is reversed:
+skip *.mdf *.ldf
+always: master.mdf master.ldf
Then the master.mdf and the master.ldf files will not be backed up
because the skip ASM is processed first.
Note: To simplify directives that include multiple potential matches
for the same file, consider using save environment keywords. For more
information, see Save Environment Keywords.
Eg: exactly the opposite to how I assumed precedence worked...
-----Original Message-----
From: Legato NetWorker discussion [mailto:NETWORKER AT listserv.temple DOT edu]
On Behalf Of Jones, Stephen (East Kilbride) [OS-IE]
Sent: Friday, 30 December 2005 8:58 PM
To: NETWORKER AT listserv.temple DOT edu
Subject: Re: [Networker] Help with Directive Format / Wildcard Syntax Plea se
Tim,
Thanks for your response. This looks like a good way forward - I'll give it a
go and see how it works out. As long as we skip the bulk of them I'll be happy.
FYI, the ls command was Korn shell on Solaris 9.
Thanks again,
Stephen
-----Original Message-----
From: Legato NetWorker discussion [mailto:NETWORKER AT LISTSERV.TEMPLE DOT EDU]
Sent: 29 December 2005 22:30
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Subject: Re: [Networker] Help with Directive Format / Wildcard Syntax Please
In regard to: [Networker] Help with Directive Format / Wildcard Syntax...:
> Starting from root, skip all files that end in ".dbf", but don't apply
> the skip to those .dbf files that start with "arch".
>
> As an example in the list of files below, I want to skip "file1.dbf"
> and "file2.dbf", but not skip "arch1.dbf" and "arch2.dbf".
>
> file1.dbf
> file2.dbf
> arch1.dbf
> arch2.dbf
>
> We thought about tackling this by applying the skip first, and then
> adding in a forget so that the skip didn't apply to files starting
> with "arch*.dbf", but the forget only seems to apply to directories.
>
> << / >>
> +skip: *.dbf
>
> << /arch*.dbf >>
> forget";
>
> The above does not work.
It's a good first try, and it proves you've read the man page. ;-)
> Is there a wildcard format for the skip command that would do the
equivalent
> of the following ls command in unix?
>
> ls !(arch*).dbf
That's more of an extended glob/fnmatch that your shell (which appears to be
csh/tcsh ? ) is giving you. NSR directives use only the basic glob characters,
AFAIK.
There's no easy way that I know of with a basic glob() to invert a class of
characters, so this won't work:
<< / >>
+skip: [^a][^r][^c][^h]*.dbf
(read that as: anything other than "a", followed by anything other than "r",
followed by ...).
Assuming that your .dbf file names are limited to a predictable range of
characters, you *might* be able to get most of the way there by doing something
like:
<< / >>
+skip: [0-9A-Zb-z]*.dbf
This will skip files named 001.dbf, foo.dbf, FOO.dbf, etc. It will not skip
any .dbf file that has a filename that begins with the letter a. It also will
not skip any .dbf files that have names that begin with characters outside
these classes, so things like
?005.dbf
-foo1.dbf
überdb.dbf
etc, will not be skipped.
It's not a perfect solution, especially if you have a lot of .dbf files that
begin with the letter a, but it gets you most of the way there.
Tim
--
Tim Mooney mooney AT dogbert.cc.ndsu.NoDak DOT edu
Information Technology Services (701) 231-1076 (Voice)
Room 242-J6, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
To sign off this list, send email to listserv AT listserv.temple DOT edu and
type "signoff networker" in the body of the email. Please write to
networker-request AT listserv.temple DOT edu if you have any problems wit this
list. You can access the archives at
http://listserv.temple.edu/archives/networker.html or via RSS at
http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER
To sign off this list, send email to listserv AT listserv.temple DOT edu and
type "signoff networker" in the body of the email. Please write to
networker-request AT listserv.temple DOT edu if you have any problems wit this
list. You can access the archives at
http://listserv.temple.edu/archives/networker.html or via RSS at
http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER
NOTICE
This e-mail and any attachments are confidential and may contain copyright
material of Macquarie Bank or third parties. If you are not the intended
recipient of this email you should not read, print, re-transmit, store or act
in reliance on this e-mail or any attachments, and should destroy all copies of
them. Macquarie Bank does not guarantee the integrity of any emails or any
attached files. The views or opinions expressed are the author's own and may
not reflect the views or opinions of Macquarie Bank.
To sign off this list, send email to listserv AT listserv.temple DOT edu and
type "signoff networker" in the
body of the email. Please write to networker-request AT listserv.temple DOT edu
if you have any problems
wit this list. You can access the archives at
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER
|