I use the attached for this.
It does exactly what you describe (walking through all media in robotic control or taking a list of media on the command line).
The step you're missing is vmquery -deassignbyid. Otherwise, you've got the right steps.
--
gabriel rosenkoetter
Radian Group Inc, Unix/Linux/VMware Sysadmin / Backup & Recovery
gabriel.rosenkoetter AT radian DOT biz, 215 231 1556
It depends on the version of NetBackup. Older versions won't move the tapes to the scratch pool automatically whereas the newer versions do. What version of NBU are you running? Windows or Unix?
To manually move the tapes, look for an assigned date of "00/00/0000"
.../Ed
I've run into a problem where my scratch volume pool is empty. However, I have tons of empty tapes (can easily list with Aptare) that just happen to be assigned to other specific pools. I can manually run bpimmedia on these empty tapes to verify that there are no images on them. But if I try to change the volume group on them via the GUI to scratch (or the Netbackup pool), I get the "cannot change volume pool for assigned media (91)" error.
If there are no images on the tape, what's the problem? I thought once images expired on tapes, they were supposed to automatically be kicked back out to a scratch pool anyway. I've found a few places where I can manually force a tape into a different volume, but it is pretty strongly suggested that you *not* do it that way.
Any suggestions?