Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mksysb script

Status
Not open for further replies.

Mag0007

MIS
Feb 15, 2005
829
US
Hey:

Does anyone have a mksysb and savevg script?

Instead of me reinventing the wheel....I prefer using a script that has been already done.


TIA!
 
Here is one we use mate.

LOGDIR=/logdirectory
LATEST=${LOGDIR}/savevolbackup.latest
LOGFILE=${LOGDIR}/savevolbackup.`date +%C +%y +%m +%d`
#
#################################################
# Create the latest file for logging
#
echo "**********************************************************" > ${LATEST}
echo "Retail: Mksysb Backup Results" >> ${LATEST}
echo "" >> ${LATEST}
echo "Start mksysb backup at: `date`" >> ${LATEST}
#
#
#################################################
# Execute the backup
#
cd /

mksysb -i -X /dev/rmt?.1

echo "End mksysb backup at: `date`" >> ${LATEST}
echo "" >> ${LATEST}


echo "Retail: SaveVG Backup Results" >> ${LATEST}
echo "" >> ${LATEST}
echo "Start savevg backup at: `date`" >> ${LATEST}

savevg -i -e -m -f /dev/rmt?.1 volumegroup >${LOGFILE}


tctl -f /dev/rmt? rewoffl

#
#
#################################################
# End the latest file and email out results
#
echo "End tar backup at: `date`" >> ${LATEST}
echo "" >> ${LATEST}
echo "Tapes can now be removed" >> ${LATEST}
 
Thanks.

I am having trouble with my mksysb then.

The attributes of my tape drive
mode yes Use DEVICE BUFFERS during writes True
block_size 1024 BLOCK size (0=variable length) True
extfm yes Use EXTENDED file marks True
ret no RETENSION on tape change or reset True
density_set_1 39 DENSITY setting #1 True
density_set_2 39 DENSITY setting #2 True
compress yes Use data COMPRESSION True
size_in_mb 20480 Size in Megabytes False
ret_error no RETURN error on tape change or reset True


To create the mksysb
tctl -f /dev/rmt0 rewind
mksysb -i /dev/rmt0

How can I test the mksysb?
 
What error message are you getting if any for your mksysb?
 
erm...

now the mksysb works! Wierd!

How can I do a quick test of the mksysb (without restoring the full system)
 
You can do that via smitty, you will be able to list files backed up on a mksysb and it will check if the backup is OK.

Menu options are

smitty
Phyiscal and Logical Information (of something like that)
System Backup
List Files In A System Backup (or I think it may say mksysb instead of backup)

Thanks
Germo
 
This should do it, you can replace the "| tee" with ">" if you don't care to see the output on the screen

echo "Rewinding the tape"

sleep 5

mt -f /dev/rmt0 rewind

echo "Creating a list of files backed up in /usr/util/makesysb.log"
echo ""
sleep 5

restore -s4 -Tvqf /dev/rmt0.1 | tee /usr/util/makesysb.log
echo ""
echo "Rewinding the tape and ejecting it"

sleep 5

mt -f /dev/rmt0 rewoffl


Norm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top