Veritas-bu

[Veritas-bu] Backup status

2003-08-06 19:14:55
Subject: [Veritas-bu] Backup status
From: Dwayne.Brzozowski AT mail.va DOT gov (Brzozowski, Dwayne)
Date: Wed, 6 Aug 2003 18:14:55 -0500
This is what I wrote (shell script) to send reports to customers daily. 

BUreport.sh
CUST=$1
LOG=/tmp/$CUST-backup-report.log
/usr/bin/date > $LOG
/usr/bin/echo >> $LOG
/usr/bin/echo >> $LOG
/usr/openv/netbackup/bin/admincmd/bperror -U -backstat | /usr/xpg4/bin/grep
-E 'STAT|'$CUST'' >> $LOG
/usr/bin/echo >> $LOG
for i in `/usr/bin/cat $LOG | /usr/bin/awk '{print $1}' | /usr/bin/sort -un`
do
if [ $i -gt 0 ]
then
/usr/bin/echo >> $LOG
/usr/bin/echo "The status code $i means:" >> $LOG
/usr/openv/netbackup/bin/admincmd/bperror -S $i >> $LOG
fi
done
/usr/bin/cat $LOG

I have this in root's cron like:
 /usr/local/scripts/BUreport.sh   POLICY_NAME|mailx  -s "COMMENT" username


It will list the following:

Wed Aug  6 06:30:01 CDT 2003


STATUS CLIENT        POLICY           SCHED      SERVER      TIME COMPLETED

and for status other than 0, will list the Veritas explanation of that code.
Hope this helps!


-Dwayne

-----Original Message-----
From: Larry Kingery [mailto:larry.kingery AT veritas DOT com]
Sent: Monday, August 04, 2003 1:51 PM
To: rajman AT ureach DOT com
Cc: veritas-bu AT mailman.eng.auburn DOT edu
Subject: [Veritas-bu] Backup status


>  Given a class(policy)name, how do i get the details of its
> backup status? 
> 
> For eg: What is the command to see the backup status of a class
> ->XYZ_system_bkup.  The output should show: the start and end
> time of the backup,  the amount of data backed up, the final
> status(success or failed) and the type of backup (full,
> incremental ...). 
> 

Start with bpimagelist -L -policy $POLICY -hoursago XXX

That'll give you almost everything you want.  You might then replace
-L with -l, which will give you a nicer format to use with scripts
(hint: use bpdbm -ctime XXX to convert unix time to human readable,
after you add the start and elapsed times to get the end time).

Note that bpimagelist only shows jobs which exit with status of 0 or
1.  To see failed jobs, you'll have to mess around with bpdbjobs
(probably with -all_columns).


-- 
Larry Kingery 
   10 kinds of people, those who understand binary and those who don't
_______________________________________________
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>