Veritas-bu

[Veritas-bu] Problems after implementing bpbackupdb script

2002-10-01 14:18:59
Subject: [Veritas-bu] Problems after implementing bpbackupdb script
From: John.Snodgrass AT icn.siemens DOT com (Snodgrass, John)
Date: Tue, 1 Oct 2002 14:18:59 -0400
All,

Thanks to help from several list members, I wrote my script to backup the
NetBackup databases and added it to cron to run at a time I know that should
be idle.  On a couple occasions, I've had a problem in that NONE of the
regular backups that were scheduled ran.  At first I thought this was
attributed to another problem we had at the time, but it happened again last
night, and I know the other problem was not an issue.

The only thing I could come up with was that the backup request daemon was
not running properly, or al all.  I was not seeing any errors in the
catalog_backups.log file, so I'm not sure what the problem is.  I looked at
the log files for bpsched and bprd and could not see anything that might
indicate a problem.  What I have done for now is to comment out the
stop/start of the request daemon.  I've included a copy of my script for
inspection, just to make sure it was not something I've done inadvertently.

#!/bin/sh
#
# John Snodgrass
# Back up NetBackup databases
# 09/18/2002

LOGFILE=/usr/openv/netbackup/site_scripts/catalog_backups.log
FAILSAFEHOUR=16

#
#  Check to see if any backups are running
#  If there are backups running and we are still within the time window,
wait 60 seconds and try again
#
while [ 1 ]
do
    BUPROCS=`ps -ef | grep bpsched | grep -v grep | wc -l`
    test $BUPROCS -eq 0 && break
    HOUR=`date +%H`
    test $HOUR -ge $FAILSAFEHOUR && break
    echo "" >> $LOGFILE
    echo "Backups Running wait to start the database backup"  >> $LOGFILE
    echo "" >> $LOGFILE 
    sleep 60
done

echo "Backing up Netbackup Databases on `/usr/bin/date`" > $LOGFILE

#
#  Stop the backup request daemon
#
#echo ""  >> $LOGFILE
#echo "Stop the NetBackup Request daemon to prevent backups from starting
`/usr/bin/date`" >> $LOGFILE
#/opt/openv/netbackup/bin/admincmd/bprdreq -terminate >> $LOGFILE 2>&1

#
#  Backup Netbackup Catalogs
#
echo "" >> $LOGFILE
echo "Start the backup of the NetBackup databases `/usr/bin/date`" >>
$LOGFILE
/usr/openv/netbackup/bin/admincmd/bpbackupdb >> $LOGFILE 2>&1

#
# Restart the backup request daemon
#
#echo "" >>$LOGFILE
#echo "Restart the NetBackup request daemon `/usr/bin/date`"  >> $LOGFILE
#/opt/openv/netbackup/bin/initbprd >> $LOGFILE 2>&1

echo "" >>$LOGFILE
echo "--------------------------------------" >>  $LOGFILE
echo "NetBackup database backup complete `/usr/bun/date`" >> $LOGFILE

/usr/bin/cat $LOGFILE | mailx -s "`/usr/bin/uname -n` netbackup databases
backup" john.snodgrass AT icn.siemens DOT com

exit 0

======================
John Snodgrass
Siemens ICN
Lake Mary, FL
407-942-5583
======================

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