Networker

Re: [Networker] Simple way of backup result in script

2011-02-15 06:50:12
Subject: Re: [Networker] Simple way of backup result in script
From: "Macina, Conrad" <Conrad.Macina AT PFIZER DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Tue, 15 Feb 2011 06:48:55 -0500
In *nix this is fairly simple.

A.      If a backup is running or not

GROUP=mygroupname
echo "show status \n print type:nsr group;name:$GROUP" | nsradmin -i -
This will return either
                      status: idle;
or
                      status: running;

B.      What the result in short was

echo "show completion \n print type:nsr group;name:$GROUP" | nsradmin -i -

This will give you the completion report, basically all the diagnostics that 
appear in the group completion message in the messages file. You should be able 
to extract what you need from that.

In Windows it's a bit more complicated because nsradmin requires a newline in 
the command and the Windows echo command doesn't (to my limited knowledge) 
offer a way to embed newlines.

So you have to create a file:
C:\>type mystatusfile
show status
print type:nsr group;name: mygroupname

C:\>nsradmin -i mystatusfile

or

C:\>type mycompletionfile
show completion
print type:nsr group;name: mygroupname
C:\>nsradmin -i mycompletionfile

HTH,

Conrad Macina
Pfizer, Inc.



-----Original Message-----
From: Terveen, Frank [mailto:Frank.Terveen AT AFM DOT NL] 
Sent: Monday, February 14, 2011 2:17 AM
Subject: Simple way of backup result in script

Dear all,

 

I have tried to generate a simple script that only shows me

 

A.      If a backup is running or not

B.      What the result in short was (see below)

 

NetWorker savegroup: (alert) AFM_PROD_INCREMENTAL completed, Total 52 
client(s), 1 Failed, 10 Succeeded with warning(s), 41 Succeeded. Please see 
group completion details for more information.

 

Failed: afmbh09

Succeeded with warning(s): afmas05, afmdb06a, afmdb06b, afmdb08, afmdbdev01, 
afmfs01, afmfs02, afmvfs01, stecs01, stees01

Succeeded: afmas02, afmas07, afmas08, afmas09, afmas18, afmas23, afmas24, 
afmas25, afmas31, afmas32, afmas33, afmas34, afmas35, afmas36, afmas37, 
afmas38, afmbh01, afmbh02, afmbh03, afmbh06.stelan.nl, afmbh07, afmdb05, 
afmdc01, AFMDC02, afmdc03, afmdwh02, afmes01, afmes02, afmll05a, afmll05b, 
afmll06, afmll07, afmris01, afmris02, afmvdb06-bh, afmvdb06-bu, afmvdb06-dwh, 
afmvdb06-ll, afmvdb06-moss, afmves01, afmvll05

 

I would like only the above to be caught via a nsradmin script but so far no 
luck

 

Any help would be greatly appreciated

 

(by the way environment = NW7.61 on Windows 2003 SP2 all clients are either 32 
or 64 bits Windows clients)

 

Thanks in advance

 

With kind regards, 

Frank Terveen 

Senior Systeembeheerder / Senior Systems Manager 

Afdeling Gebruikersondersteuning Informatiesystemen / Information Systems 
Division

Autoriteit Financiële Markten

Adres: Vijzelgracht 50, 

Postcode: 1017 HS, Amsterdam.

Postadres: Postbus 11723, 

Postcode: 1001 GS, Amsterdam. 

Centraal telefoonnummer: (020) 797 20 00.

Centraal faxnummer: (020) 797 38 00.

Doorkiesnummer: (020) 797 24 18

Faxnummer: (020) 797 38 14.

 

De AFM Bevordert eerlijke en transparante financiële markten / The AFM promotes 
honesty and transparency within financial markets

 

De AFM voert een legitimatieplicht voor bezoekers. 

Bezoekers dienen een wettelijk geldig legitimatiebewijs te kunnen tonen na 
ontvangst bij de receptie. 

Onder een geldig wettelijk legitimatiebewijs wordt verstaan een paspoort, 
rijbewijs of een identiteitskaart

 



Disclaimer:
http://www.afm.nl/disclaimer
http://www.afm.nl/disclaimer_english/
Indien u de link niet kunt openen, neemt u dan contact op met 
telefoonnummer +31 (0)20 7972000. Meer informatie vindt u op de 
website http://www.afm.nl.
If you are unable to access the link, please dial +31 (0)20 
7972000 
Additional information is available on the website 
http://www.afm.nl.

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

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>