Veritas-bu

Re: [Veritas-bu] Netbackup reports

2011-03-24 11:18:10
We got around this by modifying a built in script for NBU.

We are running NBU on RedHat but this should work for Solaris without any 
changes and Windows with a few changes.

Copy /usr/openv/netbackup/bin/goodies/media_deassign_notify to 
/usr/openv/netbackup/bin and make the changes noted below in the ***** EDIT 
***** section.  I'm sure the code can be cleaner but it works for us and I 
don't like to fix things that aren't broken.

The lines that are commented out in the *** EDIT *** section are used to write 
a log file of what is being relabeled.  We used it for testing before 
implementing the relabel just to be sure it was working correctly.

The only edit that should be needed is to change [ $4 -eq "x" ] where x is your 
robot number [TLD (x)].  We have 3 VTL's therefore the 3 if statements.

#! /bin/sh
# $Header: media_deassign_notify.sh,v 1.2 2007/01/29 20:13:15 $

#bcpyrght
#***************************************************************************
#* $VRTScprght: Copyright 1993 - 2010 Symantec Corporation, All Rights Reserved 
$ *
#***************************************************************************
#ecpyrght

#
# media_deassign_notify.sh
#
# This script is called by the NetBackup Enterprise Media Manager, after a
# media record has been de-assigned.
#
# NOTE:  this script will always be run in "background" mode, meaning that
#        the NetBackup Enterprise Media Manager  will NOT wait for it's
#        completion.
#
# This script:
#       receives 5 parameters:
#         MEDIA ID          - the ID of the media        (e.g. A00001)
#         LEGACY MEDIA TYPE - the legacy media type      (e.g. 3)
#         BARCODE           - the barcode of the media   (e.g. 111222L3)
#         ROBOT NUMBER      - the robot number           (e.g. 0)
#         ROBOT TYPE        - the robot type             (e.g. 8)
#       must be executable by the root user
#       should exit with 0 upon successful completion

OUTF=/usr/openv/netbackup/logs/label/MEDIA_DEASSIGN_CALLED.`/bin/date 
+\%Y\%m\%d`

# --------------------------------------------------------------------
# main script starts here
# --------------------------------------------------------------------

umask 022

dateStr=`date`
if [ "$#" -lt 5 ]
then
        echo ${dateStr} "media_deassign_notify expects at least 5 parameters: 
$*" >> $OUTF
        exit 1
fi

# You may want to delete the output file elsewhere in order to
# accumulate successful deassignment information.
# If so, comment out the following 4 lines.
#if [ -s $OUTF ]
#then
#       /bin/rm -rf $OUTF
#fi

if [ ! -f $OUTF ]
then
        touch $OUTF
fi

echo ${dateStr} "-----------------------------" >> $OUTF
echo ${dateStr} "         MEDIA ID:  $1"        >> $OUTF
echo ${dateStr} "LEGACY MEDIA TYPE:  $2"        >> $OUTF
echo ${dateStr} "          BARCODE:  $3"        >> $OUTF
echo ${dateStr} "     ROBOT NUMBER:  $4"        >> $OUTF
echo ${dateStr} "       ROBOT TYPE:  $5"        >> $OUTF
echo ${dateStr} "-----------------------------" >> $OUTF

# ********************************* START YOUR EDIT HERE 
************************************
#
# ----------------------------------------------------------
#  *** jinfanti added 12/27/2010 ***
#  *** Relabels any new scratch media that is in Robot X ***
# ----------------------------------------------------------
#
#echo "This is for tape library # "$4
if [ $4 -eq "0" ]
then
/usr/openv/netbackup/bin/admincmd/bplabel -o -m $1 -d hcart -p Scratch
#echo "/usr/openv/netbackup/bin/admincmd/bplabel" -o -m $1 -d hcart -p Scratch 
>> $OUTF
elif [ $4 -eq "2" ]
then
/usr/openv/netbackup/bin/admincmd/bplabel -o -m $1 -d hcart -p Scratch
#echo "/usr/openv/netbackup/bin/admincmd/bplabel" -o -m $1 -d hcart -p Scratch 
>> $OUTF
elif [ $4 -eq "3" ]
then
/usr/openv/netbackup/bin/admincmd/bplabel -o -m $1 -d hcart -p Scratch
#echo "/usr/openv/netbackup/bin/admincmd/bplabel" -o -m $1 -d hcart -p Scratch 
>> $OUTF
else exit 0
fi
#
# ********************************* END YOUR EDIT HERE 
************************************
#
# might want to mail this info to someone
#
#cat $OUTF | mail -s "Media deassigned" jinfanti AT harris DOT com
#
exit 0

Thank you, 

Joseph A. Infantino II
BackUp/Recovery Administrator
HARRIS IT Services 
Assured Infrastructure Management 
Office: 321-724-3011 | Fax: 321-724-3392
Email: joseph.infantino AT harris DOT com

      


-----Original Message-----
From: veritas-bu-bounces AT mailman.eng.auburn DOT edu 
[mailto:veritas-bu-bounces AT mailman.eng.auburn DOT edu] On Behalf Of 
Tewksbury, Kevin
Sent: Thursday, March 24, 2011 10:48 AM
To: 'ccosta.ccc AT gmail DOT com'; veritas-bu-bounces AT mailman.eng.auburn DOT 
edu; Veritas Forum (veritas-bu AT mailman.eng.auburn DOT edu)
Subject: Re: [Veritas-bu] Netbackup reports

Sorry, I should have mentioned that.  We are on Netbackup 6.5.4


Kevin R Tewksbury
Sr. Database Administrator
LimitedBrands
Limited Technology Services
3 Limited Pkwy
Columbus, OH 43230
office: (614) 415-4541
cell: (614) 582-4882
Email:  ktewksbury AT limitedbrands DOT com


-----Original Message-----
From: veritas-bu-bounces AT mailman.eng.auburn DOT edu 
[mailto:veritas-bu-bounces AT mailman.eng.auburn DOT edu] On Behalf Of 
ccosta.ccc AT gmail DOT com
Sent: Thursday, March 24, 2011 10:39 AM
To: Tewksbury, Kevin; veritas-bu-bounces AT mailman.eng.auburn DOT edu; Veritas 
Forum (veritas-bu AT mailman.eng.auburn DOT edu)
Subject: Re: [Veritas-bu] Netbackup reports

What version of Nbu are you using?
Sent via BlackBerry from T-Mobile

-----Original Message-----
From: "Tewksbury, Kevin" <KTewksbury AT Limitedbrands DOT com>
Sender: veritas-bu-bounces AT mailman.eng.auburn DOT edu
Date: Thu, 24 Mar 2011 10:35:13
To: Veritas Forum (veritas-bu AT mailman.eng.auburn DOT edu)<veritas-bu AT 
mailman.eng.auburn DOT edu>
Subject: [Veritas-bu] Netbackup reports

_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu 
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu


_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu 
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu

Notice:  This communication may contain privileged and/or confidential 
information. If you are not the intended recipient, please notify the sender by 
email, and immediately delete the message and any attachments without copying 
or disclosing them. LBI may, for any reason, intercept, access, use, and 
disclose any information that is communicated by or through, or which is stored 
on, its networks, applications, services, and devices.
_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
_______________________________________________
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>