Veritas-bu

[Veritas-bu] Using CAP/Mailslot and Netbackup 3.4

2001-02-08 17:41:15
Subject: [Veritas-bu] Using CAP/Mailslot and Netbackup 3.4
From: RYAN ANDERSON RYAN_ANDERSON AT udlp DOT com
Date: Thu, 8 Feb 2001 16:41:15 -0600
This is a multi-part message in MIME format.
--------------AE3F2AF0604B94AB87394205
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Brad Fisher P70142 wrote:
> 
> This is great! So what's the trick? I don't doubt you, but
> we can't seem to be able to. Also, on page 346 of the 3.4
> Media manager's sysadmin guide it specifically says you
> cannot ... then there is the statement by Veritas tech support
> today saying the same thing. I just checked the 3.2 manual ...
> page 111 says the same thing ... only one tape at a time on an
> eject.
> 
> Have you written some scripts using vmchange?
> 

Here's a simple one called 'tpeject'.  Use it like this:

# tpeject TAPE1 TAPE2 TAPE3

Or you can use STDIN:

# tpeject
TAPE1 (wait)
TAPE2 (wait)

(CTRL-D to escape)


Regards,

RCA
--
Ryan C. Anderson        |   United Defense L.P.    
Unix Administrator      |   763.572.6684 (desk)
ryan_anderson AT udlp DOT com  |   952.235.9936 (pager)
--------------AE3F2AF0604B94AB87394205
Content-Type: text/plain; charset=us-ascii;
 name="tpeject"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="tpeject"

#!/bin/sh
#
# File: tpeject
# Author: Ryan Anderson (from Blayne Puklich)
# Creation date: 2000-09-14
# Time-stamp: " "
#
# Description
#   Eject a tape media id (EVSN)
#   Ejects media IDs passed as parameters; if there
#   are no parameters reads STDIN.
#
# $Log: tpeject,v $
# Revision 1.1  2000/12/28 16:40:26  andersrc
# Initial revision
#
#

PATH=/usr/openv/volmgr/bin/admincmd:/usr/openv/netbackup/bin
PATH=$PATH:/usr/openv/volmgr/bin:/usr/local/bin:/usr/sbin:/usr/bin
VMCHANGE=/usr/openv/volmgr/bin/vmchange
export PATH VMCHANGE

gMe=`basename $0 .sh`

#
# Eject the media ID(s) given to us.
eject_tp() # media_id
{
        $VMCHANGE -res -m $1 -mt dlt -e
        echo "Ejected DLT with media ID $1 to mailslot."
}

if [ $# -gt 0 ]; then
    #
    # Eject all tapes passed on command line
    for tpid in $*; do
        eject_tp $tpid
    done
else
    #
    # eject all tapes passed on stdin
    while read tpid; do
        eject_tp $tpid
    done
fi
exit 0

--------------AE3F2AF0604B94AB87394205--