Please provide a command to get the deactivate policy list and date
Created: 27 Dec 2011 | 6 comments
Hi All,
I'm looking for a report that will show all of the deactivated NetBackup policies, and the date that they were deactivated. I'm not seeing a date field. Is there any way to get that info?
Please provide a command to get the deactivate policy list and date.
Thanks in advance.!
Discussion Filed Under:
Comments
It cannot be done in one
It cannot be done in one command :
You could do this :
This command will give you the policy states ... we see here the policy test_nick is not active ...
root@womble admincmd $ bppllist -allpolicies -verbose -L |egrep "Policy Name|Active"
It wont help you right now
It wont help you right now but if your concern is to track you policy activation / deactivation then OpsCenter (NOM) has a specific alert policy for this.
Any policy changes send an alert
Alternatively you could set up a script / scheduled task to list out your policies each day so that at least you keep a record of them, just add date variable to the text file name :
bppllist -allpolicies -U>policy_list.txt
Hope this helps
Authorised Symantec Consultant
Don't forget to give a "Thumbs Up" or mark as "Solution" if someones advice has helped you.
You could also make it part of your task when you deactivate
When I activate a policy I put the date and time in the "Go into effect at" so I know when I created the policy.
And when I deactivate a policy I put the date and time I tuned it of into that field - then if I do not need it again after a month I know I can remove it.
I don't have to know how to spell....I work on Unix.
NetBackup 7.0.1 - AIX & Windows
Thanks for all..
Thanks for all... will try out....
If using Unix master, try this
I'm not a wizard of scripting, but I was able to cobble something together from things I found on the internet. I have this in one file, called "check_offline_clients.sh"
find /usr/openv/netbackup/db/client/ | grep OA_ | grep -v OA_0 | nawk '{sub(/\/usr\/openv\/netbackup\/db\/client\//," ");print}' | nawk '{sub(/\/OA_/," ");print}' | while read clt date; do now=`date +%s`;export now; if [ $now -le $date ]; then ntime=`/usr/openv/netbackup/bin/bpdbm -ctime $date`; echo $clt is offline until $ntime '\n'; fi; doneAnd it gets called by this script, "nb_check_offline.sh":
#!/bin/sh #Set variables BACKUPADMS='your email addresses' CLIENTFILE='/tmp/nb_offline_clients.txt' #execute command to list all offlined clients /opt/local/ourstuff/check_offline_clients.sh > $CLIENTFILE #If tempfile containes data, send the list of offline clients to the temp email file, else report no offline clients if [ `ls -l $CLIENTFILE | awk '{print $5}'` -eq 0 ] then echo "No clients defined as OFFLINE to the NBU master server." > /tmp/NBU_offline_email.txt else echo "The following clients are defined as OFFLINE in the NBU Master Server's properties: \n" > /tmp/NBU_offline_email.txt more $CLIENTFILE >> /tmp/NBU_offline_email.txt fi echo "\n \n" >> /tmp/NBU_offline_email.txt echo "----> Script Location: /opt/local/capella/nb_check_offline.sh" >> /tmp/NBU_offline_email.txt cat /tmp/NBU_offline_email.txt | mailx -s "NetBackup Offlined Clients" ${BACKUPADMS} rm $CLIENTFILEDeactivated Date
Hi Ron,
Whether this script provide the date on which the poliy got de-activated ?
Amarnath Sathishkumar
If this comment is helpfull, Don't forget to give a "Thumbs Up" or mark as "Solution"
Would you like to reply?
Login or Register to post your comment.