Networker

Re: [Networker] Return codes for statusing a backup

2004-11-05 12:31:31
Subject: Re: [Networker] Return codes for statusing a backup
From: Darren Dunham <ddunham AT TAOS DOT COM>
To: NETWORKER AT LISTMAIL.TEMPLE DOT EDU
Date: Fri, 5 Nov 2004 09:51:52 -0800
>
> Nsradmin requires an interactive session.

No it doesn't.  I've made lots of shell and perl scripts that use it
without interaction.

% printf "show work list\nprint type:nsr group;name: default\n" |
nsradmin -i - | <perl script that parses the output>

> I'm researching wether a
> scheduling software can start a new job after first querying the status of
> a running backup. If it's only indexes waiting to offload, we'd like that
> job to start. During peak times, we've waited up to 2 hrs just for indexes
> to offload.

Run the job above.  Have the perl script parse the output into
individual ietms remaining in the work list.  Determine if all the
remaining jobs are indexes.  Have a return code or output based on that.

The nsradmin output is formatted funny sometimes, so the parsing isn't
as trivial as a grep, but it's not too difficult.

--
Darren Dunham                                           ddunham AT taos DOT com
Senior Technical Consultant         TAOS            http://www.taos.com/
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >

--
Note: To sign off this list, send a "signoff networker" command via email
to listserv AT listmail.temple DOT edu or visit the list's Web site at
http://listmail.temple.edu/archives/networker.html where you can
also view and post messages to the list. Questions regarding this list
should be sent to stan AT temple DOT edu
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=