Dell DR4300e NetVault Backup - Best Practices for Setting up VTL Containers an - Page 50
while read LINE <&10;
View all Dell DR4300e manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 50 highlights
Linux®/UNIX® platform #!/bin/bash Specify the beginning of the barcodes of the # media you wish to work with here Gather Input from user echo -n "Enter Media Label Prefix to Purge: " read name while read media_prefix do 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