Forum Discussion

AndersA's avatar
AndersA
Level 4
13 years ago

Netbackup 7.1.0.2 How do i eject tapes ??

Hi   I have made a Script where i wanna eject some tapes. i am using this command. vmchange -res -multi_eject -w -verbose -rn 0 -rt tld -rh Server -ml OU1699 -sec 1 the -sec 1 part makes it...
  • Mark_Solutions's avatar
    13 years ago

    Here is a handy little one ....

    First sort you library colums so that MediaID is the first row and Slot number is the second row

    Highlight the ones you want to eject (usually sort by time assigned) and Ctl-C to copy them.

    Create a text file named eject_tape.txt and paste it into it and save it.

    In the same directory that you have saved that information create an eject.bat file and paste in the following:

    for /f "tokens=1,2" %%a in (eject_tapes.txt) do vmchange -res -m %%a -mt <HCART> -rh <robothost> -rt <tld> -rn <0>  -rc1 %%b -e -sec 1


    vmupdate -rt <TLD> -rn <0> -rh <robothost> -h <emmserver> -use_barcode_rules

    pause

    The first part needs to be all on one line.

    Edit all of the parts in <> with the robothost name, robot number, robot type, tape density (media type) and emm server name (usually the master).

    This will eject all of the tapes in your list and then update the inventory in NetBackup

    Works a treat!