Assumptions:
NetBackup 7+, Unix master server
Intro:
If you are restoring a file recently written to tape, there's a fair chance that the tape will still be in use.
If the restore job is time-sensitive (and, really aren't they all?) here is a procedure I've tried to release
the tape (at the expense of killing the jobs that were writing to it).
I'll refer to the tape mediaID as "<mediaID>", replace this with the ID of your media - say AH0101.
- From master server – suspend ALL scheduling
master# /usr/openv/netbackup/bin/admincmd/nbpemreq -suspend_scheduling
- Dump the current job that is using that media
master# /usr/openv/netbackup/bin/admincmd/nbrbutil -listActiveMediaJobs <MediaId>If that fails, you can try an older invocation
master# /usr/openv/netbackup/bin/admincmd/nbrbutil -dump | grep <MediaID> | sed 's/.*firstuserid//;s/(Media_Drive_Allocation_Record.*//' | grep jobid - Try /usr/openv/netbackup/bin/admincmd/nbrbutil -releaseMedia <MediaID>
Else cancel the jobs that are using it.
master# bpdbjobs -cancel 397341,23422,43224 (sample unix process IDs)
- Wait five minutes until the jobs are done.
- Suspend the tape so that other jobs don’t grab it and start writing to it.
master# bpmedia –suspend -m <MediaID> -h auspcrpbak01 –v
(only needed on the media server that had grabbed the allocation of that media. Exit status = 0 )
- Resume scheduling jobs to the media server
master# /usr/openv/netbackup/bin/admincmd/nbpemreq -suspend_scheduling
- Resume the restore job. Restore jobs will still use suspended media.
- Once the restore completes, unsuspend the media <MediaID>. But if we forget to do this, the tape will be recycled into the pool once data on it expires.