on 05-19-2010 10:09 AM
Hey Don...............
ADMINCMD="/usr/openv/netbackup/bin/admincmd"
Check out these for loops ::--->
Which Tapes the clients have been written too in the past 24hrs ::--->
for i in `$ADMINCMD/bpclclients -allunique -noheader | awk '{print $3}'`
do
echo "$i \c"
$ADMINCMD/bpimagelist -media -U -client $i -hoursago 24 -idonly 2>&1|nawk 'BEGIN{RS="="} $1=$1'
done
All Tapes associated to which clients ::--->
for i in `$ADMINCMD/bpclclients -allunique -noheader | awk '{print $3}'`
do
echo "$i \c"
$ADMINCMD/bpimmedia -U -client $i 2>&1|sed '1,5d'|cut -c89-95|sort|uniq|nawk 'BEGIN {RS="="} $1=$1'
Joe Despres
Thanks for the suggestions Joe,
I run this by creating a list of clients that I want to know what tapes were used:
------------------------------------------
server_list=`grep -v '^#' ${app_path}/server.list`
for f in ${server_list};
do {
echo " " >> ${report}
echo "Media used for Exchange Mailbox Backups -- ${f} on ${today}" >> ${report}
/usr/openv/netbackup/bin/admincmd/bpimagelist -U -d ${today} -e ${today} -client ${f} -media -pt MS-Exchange-Server >> ${report}
echo " " >> ${report}
}
done
--------------------------------------------
the "pt MS-Exchange-Server" gets me only those kinds of backups.
pt = Policy Type
Don Wilder
Hi Don
I was looking for a script which can help me to fulfil my client's requirement. Got your post but couldn't make out the script completely. Please help me to get one. Below is my requirement:
My client need to run tape written report on every Thursday 10:00 AM counting from last Thursday 10:00 AM. Generally we get 50+ tapes as output. Next, We check these tapes details in TLD and copy data expiration for all those 50+ tapes manually and create one excel sheet where we mention tape detail along with expiration date and send these details to them. Please help me to get a script where we can get these details in mail every week rather doing manually ? We have master server is linux and we have 4 TLDs and we need these report only for TLD(3). Moreover, it will be great help if after getting list we are able to eject 45 tapes at one because CAP capacity is only 45 tapes.
Thanks in Advance,
Nitesh Kumar
Hi,
Is there any scripts for windows master server Netbackup Report Script to determine media used by clients? Thanks.
I am not a Powershell script writer unfortunately. I wrote this script several years ago and still use it today, but on a UNIX master. I have always considered re-writing it for windows use, but never got around to it. It should be fairly simple to write, but you will need some external applications other than the stock netbackup ones. Such as an email program like blat to get the reports sent off.
There also may be a way to do this function in OpsCenter... BUT as I already have this script have never seen the need to investigate further.
If I do get a windows version up and running it will be posted here also.
Don