Data Protector Import Example Script - HP 12000 Design Manual

Hp vls solutions guide design guidelines for virtual library systems with deduplication and replication (ag306-96032, july 2011)
Hide thumbs Also See for 12000:
Table of Contents

Advertisement

called BACKUP2 (MONTHLY), you can enter (WEEKLY) and (MONTHLY) in the configuration.
The suffix removal applies to all backup job names.
DB2 Databases: for deduplication to work you must set parallelism to 1 for DB2 backups.

Data Protector Import Example Script

The following section details an example script to perform the tape import commands for HP Data
Protector. The input to the script is the ISV Import email report (containing a list of cartridges by
/barcode/library/slot that were successfully replicated and thus are ready for import).
This example uses a Linux server client which contains the email processing script (above) and has
CLI access to the Data Protector CLI. The virtual library on the VLS target device has been presented
to Data Protector over Fibre Channel and configured in Data Protector as a tape library with tape
drives (each tape drive will have its own Data Protector drive name). A recommended configuration
would be to reserve a subset of the drives in the library just for use by tape import (do not use
these drives for any other jobs) and the remaining drives can be used for restore jobs or copy to
physical tape etc. This is because the import script needs to define the Data Protector drive names
that it can use for import jobs and it would make the script more complex to handle drives that
might be in use for other jobs when you want to run an import. One way of defining the Data
Protector drive names would be to create a lookup file that defines the library serial number and
the Data Protector drive name (or names) that can be used for import. For example, a "libmap_file"
containing:
DEC06150U7~DP_cell2_lib03_drv1~DP_cell2_lib03_drv2
The actual script would process the cartridge list from stdin (identified by the "ISV" tag at the
beginning of the line) and use the Data Protector CLI to trigger a tape import on the specified
drive(s). For example:
#!/bin/bash
#read from stdin
CARTLIST=`grep ISV~ /dev/stdin`
DRVBSY=( 0 0 0 0 )
for CART in $CARTLIST
do
BARCODE=`echo $CART | awk -F"~" '{print $2}'`
LIBSERIAL=`echo $CART | awk -F"~" '{print $3}'`
BCSLOT=`echo $CART | awk -F"~" '{print $4}'`
DRVNAME[0]=`grep $LIBSERIAL $LIBMAP | awk -F"~" '{print $2}'`
DRVNAME[1]=`grep $LIBSERIAL $LIBMAP | awk -F"~" '{print $3}'`
DRVNAME[2]=`grep $LIBSERIAL $LIBMAP | awk -F"~" '{print $4}'`
DRVNAME[3]=`grep $LIBSERIAL $LIBMAP | awk -F"~" '{print $5}'`
if [ -z ${DRVNAME[0]} ]
then
DRVBSY[0]=1
fi
if [ -z ${DRVNAME[1]} ]
then
DRVBSY[1]=1
fi
if [ -z ${DRVNAME[2]} ]
then
DRVBSY[2]=1
fi
if [ -z ${DRVNAME[3]} ]
then
DRVBSY[3]=1
fi
#find a drive to use
for i in `seq 0 3`;
do
if [ ${DRVBSY[$i]} -eq 0 ]
then
/usr/omni/bin/omnimm -recycle $BARCODE
/usr/omni/bin/omnimm -export $BARCODE
/usr/omni/bin/omnimm -import ${DRVNAME[$i]} -slot $BCSLOT &
DRVBSY[$i]=1
break
fi
done
if [ ${DRVBSY[0]} -eq 1 ] && [ ${DRVBSY[1]} -eq 1 ] && [ ${DRVBSY[2]} -eq 1 ] && [ ${DRVBSY[3]} -eq 1 ]
then
138 VLS Configuration and Backup Application Guidelines

Advertisement

Table of Contents
loading

Table of Contents