Has anyone ever been successful making a mksysb backup on to a remote tape drive? I'm running AIX 4.3.3 on an IBM RS/6000. Any help, suggestion, tips would be greatly appreciated.
This obviously does you no good if you cannot hook a tape drive up to the remote system if you need to restore but...Try this script:
#!/bin/ksh
#
# @(#) Remote mksysb V1.00
# @(#) Updated for 4.3.3 12/03/2001 V1.02
#---------------------------------------------------------------------#
# Create a bootable tape while doing remote backups. #
#---------------------------------------------------------------------#
devck=`echo $2|cut -c1-5`
if [ "$devck" != "/dev/" ];then
echo "Usage: rmksysb <remote_hostname> </dev/rmt#.1>"
echo "This should be run on the system that does NOT have a tape drive..."
exit
fi
REMOTEH=$1 # Remote host for backup
REMOTET=$2 # Remote tape for backup
#
# Check the remote system to determine if .rhost file has an entry for this
# system.
#
rsh $REMOTEH date > /dev/null
if [ $? -ne 0 ] ; then
echo "The remote system requires an entry in the .rhosts file if you\c"
echo " want to use \nthe tape drive!!!";exit
else
echo "Permission to use $REMOTEH granted..."
fi
#
echo "Remote host is $REMOTEH Remote device is $REMOTET"
echo "Creating bootable tape..."
PIPE="/tmp/.image.data" # Filename of the pipe
#---------------------------------------------------------------------#
# Rewind the tape and fix the blocksize. #
#---------------------------------------------------------------------#
echo "Rewinding tape and fixing blocksize."
rsh ${REMOTEH} "tctl -f ${REMOTET} rewind"
rsh ${REMOTEH} "/usr/lib/methods/chggen -l ${REMOTET} -a block_size=512"
#---------------------------------------------------------------------#
# Create the first 3 files on tape. #
#---------------------------------------------------------------------#
echo "Creating the first 3 files on the tape..."
MYPATH="/usr/ucb:/bin:/usr/bin:/etc:/usr/sbin:/usr/bin/X11:/usr/local/bin"
rsh ${REMOTEH} -n exec /bin/sh -c "'PATH=\"$MYPATH\";export PATH; exec /usr/sbin/bosboot -d ${REMOTET} -a'"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.