Networker

Re: [Networker] Unique save set name problem finally solved?

2007-05-08 20:01:44
Subject: Re: [Networker] Unique save set name problem finally solved?
From: George Sinclair <George.Sinclair AT NOAA DOT GOV>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Tue, 8 May 2007 19:59:53 -0400
Darren Dunham wrote:
/bin/sh /usr/sbin/nsrnmo_level1_test -s server_name -g group_name -LL -m client_name -t 1178573804 -l incr -q -W 78 -N path2RMANscript path2RMANscript

So, we would just need to change the value following the '-N' as you suggested. However, it's going to be a bit involved getting the correct time value. If we do it the way we've been doing it then NW figures it out and passes all the correct parameters. If we create the wrapper script and specify that instead then we're going to have to explicitly call the nsrnmo script (nsrnmo_level1_test) with all the expected parameters; otherwise,
it bombs with the "nsrnmostart returned status of 255" message.
No... your script will be passed all of that stuff.  You just need
to change the -N part to what you want, then pass it all on to nsrnmo.
I created a shell script (under /usr/sbin) with the following line:

/usr/sbin/nsrnmo -N name

If you do that, you're not passing any of that other information.  It
might not be right, but as a first pass I might try:

/usr/sbin/nsrnmo "$@" -N name

Yes, I can try that. And, of course, I would definitely want "$@" and not "$*" since I want it passed in as separate words, right? I'm a little rusty on my shell script syntax so had
to look that one up, but I believe "$*" would make it all as one word.

I guess the thing here, though, is that being able to do this really doesn't buy me that much because all the save sets will still have the same name, which if I want that to be a different name than the default RMAN script name then great - and that is what I originally asked about - but since we currently use one script for fulls and another for incrementals, we just name the scripts to something meaningful like 'level_full' or 'level_1', and then it's clearer as far as which is which, but having something a little fancier wherein the save set that contains the control file get named with a 'cf', and the other ones get named with a 'df' is what I really want, and using the format command does give me that as far as what shows up in nsrinfo, but not mminfo. Getting that into mminfo doesn't really seem feasible since the control file is going to get backed up regardless. There's no way I can really exclude that from getting backed up by the RMAN script unless I backed up each database file separately, which would
be a nightmare.

So, even if we had another rman script that backed up just the control file, and we had another client resource that ran that one, and we had that one get launched after the other then we'd indeed have what we want, but then we'd end up with 2 save sets that both contain the control file - the first one from the RMAN script that backs up all the savesets, each having 'df' in the name, and the second one from the RMAN script having the desired 'cf' in the name, but that would be a little confusing since the one that got named 'df' really is not a datafile. Moreover, there's really no way I know of for the other variables in the RMAN script using format, e.g., %d, %u, %s, etc. to get easily calculated in the wrapper script. I guess after all this work, it
just doesn't seem worth it. [sigh].

George
I placed the name of the shell script in the 'Backup command' field for the client resource. It expected it to begin with 'save' or 'nsr', so I named its something like nsr_test.sh

Yes.

But when I ran the group, it failed and only backed up the client index. NetWorker reported 1 retry attempted on the rman script (save set name) and reported the following error:

client:RMAN:/path2_rman_script nsrnmostart returned status of 255
client:RMAN:/ path2_rman_script /usr/sbin/nsrnmo exiting.

You're not passing any of the arguments into nsrnmo.



--
George Sinclair - NOAA/NESDIS/National Oceanographic Data Center
SSMC3 4th Floor Rm 4145       | Voice: (301) 713-3284 x210
1315 East West Highway        | Fax:   (301) 713-3301
Silver Spring, MD 20910-3282  | Web Site:  http://www.nodc.noaa.gov/
- 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