Networker

[Networker] How to skip everything but certain files?

2009-05-27 18:14:28
Subject: [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: Wed, 27 May 2009 18:10:03 -0400
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.


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

The closest thing I can think of to do would be to move those .html files to another, higher level directory (dir2) under a similar directory structure to avoid duplicate names and create sym links to them from the original directory (dir1) and then skip the original directory via a client side .nsr or server side directive. This would allow them to get updated and backed up (under their real location) but still appear under the original location even though that's off the backups. This assumes, of course, that I know where they live.

Or I could have the .nsr file be one level up like data/.nsr

skip: dir1

and then have a client resource that specifies each .html file pathname. These wouldn't be affected by the client side directive since it lives one level above, but I'd have to list all the .html files as separate save sets.

I suppose another possibility would be to have a client side directive like that above, along with a client side script that just crawls through the directory every night looking for .html files and backs up each one (level full) if it's newer than what the media db shows for that same save set name or if it's not listed in the db since it's a new file all together. That would avoid the need to hard code everything, and the script could get run from an NSR client resource (backup command), so it could still get launched as a group (assigned a group name) with autostart, etc., but this seems a pain also.

Thanks.

George

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