Dell PowerVault DR6000 User Manual

Page 59

Advertising
background image

59

Setting up NetVault Backup Native Virtual Tape Library on the Dell™ DR4X00 Disk Backup
Appliance

if [[ -z "${media_prefix}" ]]

then

echo "That was empty, try again."

else
if [ $media_prefix = "." ]

then

echo "Exiting..."

exit 0

fi

echo "Executing now...with $media_prefix"
break

fi

done

# End of the loop

nv_home=`head -n -1 /etc/.nv6_home`

nvutil=$nv_home/util
logfile=/tmp/logddclean.log

rm -rf /tmp/mediapurge

# ================================================

# Grab media info on tapes in the VTL

# ================================================

$nvutil/nvreport -class media -exclude "%Librarystatus = Online" -format "%label" -sort "%label" | grep $media_prefix >

/tmp/mediapurge
echo "===================================="

echo "Processing the following media list:"

echo "===================================="

cat /tmp/mediapurge|awk '{print $1}'

read expired_media < /tmp/mediapurge

# ================================================
# Create an array and throw data into it

# Run commands against the data in the array

# ================================================

#Open file for reading

exec 10</tmp/mediapurge

let count=0
while read LINE <&10; do

media[$count]=$(echo $LINE | awk '{print $1}')

tempstring=${barcodes[$count]}

barcodes[$count]=${tempstring%" "}

media_avail[$count]=$LINE

((count++))

done
array_num_avail=0

while [ $count -gt 0 ]; do

echo "================================================"

echo "Purging Media with label ${media[$array_num_avail]}"

echo "================================================"

sleep 1
echo $nvutil/nvremovemedia -medialabel ${media[$array_num_avail]}

echo "================================================"

$nvutil/nvremovemedia -medialabel ${media[$array_num_avail]}

wait

sleep 2

let array_num_avail=array_num_avail+1
let count=count-1

done

# close file

Advertising
This manual is related to the following products: