This article is now obsolete, Symantec has released the Netbackup decommission tool. It included in Netbackup 6.5.6. For 6.5.5 and earlier. Take a look at this Symantec Connect thread.
Stumped into a small challenge today. I needed to remove a test media server from my Netbackup environment, no problem I know the procedure, did that may time before, I have even written a script that does the job of assigning media to another media server. So did the script work ...... Well you guessed it - It did NOT work. I had media sharing enabled - and that broke the script AND the procedure Symantec has published on their support site (Technote 266270)
The root case showed to be the command:
bpmedialist -mlist -l -h media_server
That command did not return any tapes at all. So I logged a quick call to the Netbackup UK support staff - and the answer was to use nbemmcmd -lismedia and look for the filed "Last Write Host".
====================================================================
Media GUID: f214b9fe-a11a-11dd-8000-a9302bb46368
Media ID: 500000
Partner: -
Media Type: HCART3
Volume Group: 001_00000_ACS
Application: Netbackup
Media Flags: 1
Description: Added by Media Manager
Barcode: 500000
Partner Barcode: --------
Last Write Host: darwin
Created: 10/23/2008 13:54
Time Assigned: 10/23/2008 00:53
First Mount: 10/23/2008 14:45
Last Mount: 10/23/2008 14:45
Volume Expiration: -
Data Expiration: 01/23/2009 23:53
Last Written: 10/23/2008 00:53
Last Read: -
Robot Type: ACS
Robot Control Host: NONE
Robot Number: 0
AcsAcs: 0
AcsLsm: 0
Cleanings Remaining: -
Number of Mounts: 1
Maximum Mounts Allowed: 0
Media Status: FULL MPX
Kilobytes: 683351040
Images: 173
Valid Images: 173
Retention Period: 4
Number of Restores: 0
Optical Header Size Bytes: 1024
Optical Sector Size Bytes: 0
Optical Partition Size Bytes: 0
Last Header Offset: 0
Adamm Guid: 00000000-0000-0000-0000-000000000000
Rsm Guid: 00000000-0000-0000-0000-000000000000
Origin Host: NONE
Master Host: main
Server Group: UNRESTRICTED_SHARING_GROUP
Upgrade Conflicts Flag:
Pool Number: 4
Volume Pool: nn_scheduled
Previous Pool Name: scratch
Vault Flags: -
Vault Container: -
Vault Name: -
Vault Slot: -
Session ID: -
Date Vaulted: -
Return Date: -
I then wrote a new small Perl script that changes media assignment with UNSTRICTED_MEDIA_SHARING enabled.You can find it in the file section of this site or use the link HERE