Veritas-bu

[Veritas-bu] Command Line to show active/inactive policies

2005-02-11 13:45:28
Subject: [Veritas-bu] Command Line to show active/inactive policies
From: SKampen AT verisign DOT com (Kampen, Scott)
Date: Fri, 11 Feb 2005 10:45:28 -0800
Hello Paul, 

Here is a little script I wrote to report the active/inactive state of a
policy.  It will search through each of your policies and then tell
whether it is active or not.  I am by no means a script God and there is
probably another way of doing this, but "Hey, it works for me!"

This has only been run on a Solaris 9 system running Netbackup 5.0  I
have 187 policies and the script took about 60 seconds to run.

It reports back in this format:

Yes Policy1 is active
Yes Policy2 is active
No  Policy3 is not active
Yes Policy4 is active

The "Policy#" field will be the name of the policy(s) you have.  You can
customize the output however you wish.
Scott Kampen

***********Beginning of Script**************

#!/bin/sh
# Written by Scott Kampen on 12/25/04
#set -x
rm /tmp/classstatus
bppllist=/usr/openv/netbackup/bin/admincmd/bppllist
bpplinfo=/usr/openv/netbackup/bin/admincmd/bpplinfo
classlist=/tmp/classlist
classstatus=/tmp/classstatus

$bppllist > $classlist 

for policy in `cat  $classlist`
do
state=`$bpplinfo $policy -L | grep Active | awk '{print $2}'`
if [ "$state" = "yes" ]
then
status="Yes $policy is active"
else
status="No  $policy is not active"
fi
echo "$status" >> $classstatus
done
more $classstatus


***************End of Script******************




-----Original Message-----
From: veritas-bu-admin AT mailman.eng.auburn DOT edu
[mailto:veritas-bu-admin AT mailman.eng.auburn DOT edu] On Behalf Of Paul
Porcelli
Sent: Friday, February 11, 2005 7:25 AM
To: veritas-bu AT mailman.eng.auburn DOT edu
Subject: [Veritas-bu] Command Line to show active/inactive policies


Hi folks,
is there a Netbackup command which will show me the
status of all our policies ?
i.e. Whether they are active or inactive 

Thanks.

Visit us at http://www.aggreko.com

Confidentiality Notice:  This communication and any accompanying
attachments contain confidential information intended for a specific
individual and purpose.  This communication is private and protected by
law.  If you are not the intended recipient, you are hereby respectfully
notified that any disclosures, copying, forwarding or distribution, or
the taking of any action based on the contents of this communication is
strictly prohibited.

_____________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu

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