How do I determine how large each tape is in NetBackup?
Determining how much data is on each tape is a useful piece of information. You can use the command bpimagelist.
Ex. bpmedialist -l
Below is a script which you can use to parse the information into a useful report.
#!/bin/bash
>/tmp/time_conversion.out
echo “Expiration Date” >> /tmp/time_conversion.out
echo “” >> /tmp/time_conversion.out
sudo bpmedialist -l | awk ‘/^[0-9][0-9][0-9][0-9][0-9][0-9]/{print $7}’ > /tmp/time_conversion
for time in $(cat /tmp/time_conversion)
do
sudo bpdbm -ctime $time | awk ‘{print $4, $5, $7}’ >> /tmp/time_conversion.out
done
echo “”
sudo bpmedialist -l | nawk -f tape_size.awk > /tmp/tape_size.out
paste /tmp/tape_size.out /tmp/time_conversion.out > /tmp/tape_size.rpt
cat /tmp/tape_size.rpt
echo “”