Hello Bill
You can use a shell script to do this.
Take a look
============================================================================================================================
#!/bin/bash
clear
echo "list pools" | bconsole | grep "[+|\|]"
read -p "Type the name of Pool you want to exclude the volumes:: " pool
echo "Pool selected: $pool"
echo ""
read -p "Enter the status of the volumes you would like to check (Error,
Used, Full, Append, Recycled): " volstatus
arraysize=$(echo "list media pool=$pool" | bconsole | grep "|" | grep -v
"MediaId" | grep "$volstatus" | cut -d "|" -f3 | sed 's/ //g' | wc -l)
#volname=$(echo "list media pool=$pool" | bconsole | grep "|" | grep -v
"MediaId" | grep "$volstatus" | cut -d "|" -f3 | sed 's/ //g')
echo ""
for volname in $(echo "list media pool=$pool" | bconsole | grep "|" | grep
-v "MediaId" | grep "$volstatus" | cut -d "|" -f3 | sed 's/ //g'); do
#echo "delete volume=$volname pool=$pool yes" ;
echo "$volname" ;
done
echo -e "$arraysize volumes were found with status $volstatus\n"
read -p "Are you sure you want to delete all $arraysize volumes? This
operation is irreversible! (Y-Yes / N-No)" confirm
if [ "$confirm" == "s" ] || [ "$confirm" == "S" ]; then
for volname in $(echo "list media pool=$pool" | bconsole | grep "|" |
grep -v "MediaId" | grep "$volstatus" | cut -d "|" -f3 | sed 's/ //g'); do
echo "delete volume=$volname pool=$pool yes" ;
# Uncomment the line below to exclude the volumes in the catalog
#echo "delete volume=$volname pool=$pool yes" | bconsole ;
# If you need to physically delete you can uncomment the command below
# rm -f /backup/$volname
done
echo "Deleting volumes..."
else
echo "Abort!"
fi
============================================================================================================================
Best Regards
*Wanderlei Hüttel*
http://www.bacula.com.br
Em qua, 19 de set de 2018 às 08:42, Bill Damage via Bacula-users <
[email protected]> escreveu:
> We had a disk error with the disk which holds the bacula catalogs, and
> many of the older catalog files themselves are gone. Newer ones are OK, but
> now when we list the pool for that Catalog many of these entries under
> VolStatus are "Error". Is there a safe way to just remove these please?
> _______________________________________________
> Bacula-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users