Bacula: prune all volumes from all pools

http://old.nabble.com/prune-from-a-script-td16259610.html

#!/bin/sh
 
volumes=`mysql -ubacula -B -e'select VolumeName from Media order by VolumeName;' bacula | tail -n+2`
 
for vol in `echo $volumes`
do
   echo "prune volume=${vol} yes" | bconsole
done