Networker

Re: [Networker] How to skip everything but certain files?

2009-05-28 17:17:50
Subject: Re: [Networker] How to skip everything but certain files?
From: George Sinclair <George.Sinclair AT NOAA DOT GOV>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Thu, 28 May 2009 17:12:54 -0400
A Darren Dunham wrote:
On Wed, May 27, 2009 at 06:10:03PM -0400, George Sinclair wrote:
Is it possible to set up a directive that would skip everything (recursive) under a directory except certain files, e.g. skip everything but .html files anywhere they exist?

NetWorker's directives seem to be based on what to exclude, not what to include. Too bad you can't go the other way or use wild cards with save sets? Any possible way to use 'ignore' or 'forget' here? I can't think of one that would accomplish this.

From the uasm(1m) man page:

    Note that once different modes are set, the only way to turn them
    off is to explicitly match an ASM directive for uasm.


The way they word it makes it a little ambiguous. I never thought about using 'uasm' itself in a directive. Also, the man page mentions:

Walking ASMs traverse directory trees. The skip, null, and nullasm ASMs do not walk.

Does that mean that it will not descend?

I'd try something like this:

null: * .?*
uasm: *.html

I experimented with this by creating various '.html' files under the /data/dir1 directory and then running 'savegrp -n -l incr groupname' from the primary backup server to test to see how much would be reported. The '.html' files were large enough to generate reliable numbers. The results indicate that only '.html' files that exist at the top level of the directory will be captured, none further down.

However, in order to get this to work even just for the top level it was necessary to either specify '+null: * .?*' or list the 'uasm: *.html' line first, before 'null: * .?*'. Otherwise, it doesn't even get the ones at the root level of the directory. I tried with both a '.nsr' file under the directory itself as:

+null: * .?*
uasm: *.html

and one at the level just above it as:

<< dir1 >>
+null: * .?*
uasm: *.html


I have a directory (/data/dir1), and the only thing that will get updated might be some .html files. Everything else can be skipped.

If it's only one directory (and not subdirectories) you could use skip
instead of null.  But I'm afraid skip will stop descending directories,
so you couldn't see html files at lower levels.  That's just a guess
though.  I haven't played with how they descend in a while.



--
George Sinclair
Voice: (301) 713-3284 x210
- The preceding message is personal and does not reflect any official or unofficial position of the United States Department of Commerce -
- Any opinions expressed in this message are NOT those of the US Govt. -

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 with 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

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