I'm trying to get a script using BPIMMEDIA to output the media id,
client name, backup id, schedule type, and backup date.
 
Here's what I have so far:
 
DATE=`date +%m%d%y_%T`
NBUPATH=/usr/openv/netbackup/bin/admincmd
CUSTVLTPATH=/usr/openv/netbackup/vault/sessions/Vault
LASTSID=`cat $CUSTVLTPATH/session.last`
CUSTSIDPATH=/usr/openv/netbackup/vault/sessions/Vault/sid$LASTSID
OUTFILE=/var/tmp/vltsid$LASTSID_$DATE
 
for MEDIAID in `more +2 $CUSTSIDPATH/eject.list | awk '{print $1}'`;
        do 
        printf "$MEDIAID\n" >> $OUTFILE
        $NBUPATH/bpimmedia -mediaid $MEDIAID -l | grep IMAGE | awk
'{print $2,$4,$5}' >> $OUTFILE
        printf "\n" >> $OUTFILE
done 

 
This script gives me output with the mediaid on the line above all the
images, but instead, I want it repeated at the beginning of each line of
images. I also need to get the backup date in a human readable format
and cannot figure out how to separate the ctime from the backupid to run
it against bpdbm -ctime to get the real time. I have tried to use read,
but it would not work for me.
 
All help for a scripting newbie is appreciated!
Offlist replies are welcome.
 
Rusty Major, MCSE, BCFP
Sr. Data Assurance Engineer
(281) 584-4693
VeriCenter, Inc.
 
_______________________________________________
Veritas-bu maillist  -  Veritas-bu@mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu

Reply via email to