[Veritas-bu] Getting a list of already expired tapes?
2002-01-10 14:46:29
Subject: |
[Veritas-bu] Getting a list of already expired tapes? |
From: |
ggagnon AT ibasis DOT net (George Gagnon) |
Date: |
Thu, 10 Jan 2002 14:46:29 -0500 |
Here is a script that lists all tapes with retension periods for offsite
storage. It lists barcode, date, whether its full or has space left on tape
and the retention period.
I hope this helps.
# cat tapes.sh
#!/bin/sh
DATE=`/bin/date +%Y%m%d_%H%M%S`
SUFFIX=$DATE.$$
AVAIL=/var/tmp/available_media.$SUFFIX
LIST=/var/tmp/bpmedialist.$SUFFIX
/usr/openv/netbackup/bin/goodies/available_media | grep TLD | grep -v CLN |
sort -n > $AVAIL
/usr/openv/netbackup/bin/admincmd/bpmedialist -summary | grep expires | sed
s/' '//g | sort -n > $LIST
echo "EXPIRE\t\tTAPE\tSTATUS\t\tUSED"
echo "------\t\t----\t------\t\t----"
for TAPE in `awk '{print $1};' < $AVAIL` ; do
STATUS=`grep $TAPE $AVAIL | awk '{print $9};'`
USED=`grep $TAPE $AVAIL | awk '{print $8};'`
EXPIRE=`grep $TAPE $LIST | awk '{print $3};' | awk -F\/ '{print $3, "/",
$1, "/", $2};'| sed s/' '//g`
if [ "X$EXPIRE" = "X" ] ; then
EXPIRE='-\t'
fi
if [ "X$EXPIRE" = "X/INFINITY/" ] ; then
EXPIRE='INFINITY'
fi
echo "$EXPIRE\t$TAPE\t$STATUS\t$USED"
done | sort
rm $AVAIL
rm $LIST
-----Original Message-----
From: Jeff Kennedy [mailto:jlkennedy AT amcc DOT com]
Sent: Thursday, January 10, 2002 2:28 PM
To: NBU List
Subject: [Veritas-bu] Getting a list of already expired tapes?
Maybe I'm just being dense today but I can't see the answer....
I need to produce a list of already expired tapes with a given barcode.
I have different barcodes for different sites and the offsite storage
for one of these sites is here. So I have a slew of tapes in a safe
here but need to know which ones can be re-used. The media summary
report lists tapes that are going to expire and when, but not tapes that
are currently expired (is this correct?).
--
=====================
Jeff Kennedy
Unix Administrator
AMCC
jlkennedy AT amcc DOT com
_______________________________________________
Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
|
|
|