Home | Contact Us | Submit Troubleshooting Info | Search | Help


    Output | Software Solutions | Proofing | Color, Screening and Calibration | Scanning | Digital Photography | Consumables | POS


Networker

DLT to AIT-2 Cassette Duplication

--------------------------------------------------------------------------------------------------------------------
The following is a script that helps copying Legato volume to another one (can be DLT to AIT,etc).
Please do:
1.Cut&paste the script into a file called "TCopy" (insure right caps !!!)
2.chmod +x TCopy
3.TCopy <SourceDrive> <DestinationDrive> <VolumeName>
------------------------------------------------------------------------------------------------------------------------------------------
#!/bin/ksh
#
# This script will execute the tcopy command and record
# (append with date stamp) all information into a log file
# (/scitex/version/logs/tcopy.log)
#
# USAGE: TCopy <SourceDrive> <DestinationDrive> <VolumeName>
# Example: TCopy rmt5 rmt0 ripro1.archive.006
#
# Written by: Arie Doron
# Version: 1.5
# Date: 7/17/2002
#

TC_LOG=/scitex/version/logs/TCopy.log
TRM_LOG=/scitex/version/logs/TCterm.log

if [ $# -ne 3 ]; then
echo "\nERROR: Incorrect number ($#) of arguments"
echo " "
echo " $0 <rmt#> <rmt#> <ripro.archive.xxx>"
echo " ( $0 SourceDrive DestinationDrive VolumeName)"
echo "\nSpecify the FULL Volume name ( Like: ripro#.archive.005)"
echo " "
exit 1
fi

# Check if file exists. If not create it.
if [ ! -f "$TC_LOG" ]; then
touch $TC_LOG
chmod 666 $TC_LOG
fi

SDATE=`date | cut -c1-10`
SYEAR=`date | awk '{print $6}'`
STIME=`date |cut -c12-19`

# Test source Drive. Assuming still being used for retrieving until all volumes are done
T_S_DRIVE=`nsrmm | grep $1 | awk '{print $1}'`
if [ "$T_S_DRIVE" != "(nothing)" ]; then
# Destinatation drive type
S_DRIVE=`nsrmm | grep $1 | awk '{print $1,$2}'`
else
# Destinatation drive type
S_DRIVE=`nsrmm | grep $1 | awk '{print $4,$5}'`
fi

# Test destination drive
T_D_DRIVE=`nsrmm | grep $2 | awk '{print $1}'`
if [ "$T_D_DRIVE" != "(nothing)" ]; then
echo " "
echo "Warning: Volume in destination drive is NOT BLANK or"
echo " Destination drive is NOT DISABLED"
echo " "
exit 1
fi

# Destinatation drive type
D_DRIVE=`nsrmm | grep $2 | awk '{print $4,$5}'`

# Test your Volume Name input
T_VOL=`mminfo -am |grep $3`
if [ ! "$T_VOL" ]; then
echo "\nNo such ($3) Volume\n"
exit 1
fi

echo " "
echo "IMPORTANT NOTE: Switching (confusing) between source and destination"
echo " will erase information from the correct (source) volume"
echo " with valid data"
echo " "
echo "Your response suggested (assuming Source & Destination tapes are"
echo "in drives):\n"
echo " Source is: /dev/$1 ($S_DRIVE)"
echo " and"
echo " Destination is: /dev/$2 ($D_DRIVE)"
echo " and"
echo " Volume Name is: $3"
echo " "
echo " Is this correct (y)?"
read answer

if [ "$answer" != "y" ]
then
exit 1
fi

clear
VOLSIZE=`/backup/bin/mminfo -av -r 'written' $3`
SAVESETS=`/backup/bin/mminfo -av -r 'savesets' $3`
FILES=`/backup/bin/mminfo -av -r 'mediafile' $3 >/tmp/FL.tmp; tail -1 /tmp/FL.tmp; rm /tmp/FL.tmp`

# Starting time stamp
echo "==================================================" |tee -a $TC_LOG
echo "Start: $SDATE, $SYEAR Time: $STIME" |tee -a $TC_LOG
echo " Duplicating Volume: $3" |tee -a $TC_LOG
echo "[Capacity: $VOLSIZE, # of Savesets: $SAVESETS, # of Files: $FILES]" |tee -a $TC_LOG
echo "==================================================" |tee -a $TC_LOG
echo " " |tee -a $TC_LOG

# The acutual copy command
tcopy /dev/$1 /dev/$2 2>&1 |tee -a $TC_LOG

# Record closing section
EDATE=`date| cut -c1-10`
EYEAR=`date | awk '{print $6}'`
ETIME=`date |cut -c12-19`
echo " " |tee -a $TC_LOG

# Ending time stamp
echo "==================================================" |tee -a $TC_LOG
echo " End: Duplicating Volume: $3" |tee -a $TC_LOG
echo " $EDATE, $EYEAR Time: $ETIME" |tee -a $TC_LOG
echo "==================================================" |tee -a $TC_LOG


 


    Copyright © 2005 Creo Inc. All rights reserved. Confidential. Back to top.