Hi Shailla,
you have to redirect output of mksysb, for example
0 21 24 * * /usr/bin/mksysb -i /dev/rmt0 > /tmp/mksysb.output 2>&1
(Use better mksysb -m -i /dev/rmt0)
Regards Boris
The simplest thing to do is just check the status value at the end. If it completes successfully it will return zero otherwise a positive value
rather than call mksysb directly from cron, write a script which calls mksysb then checks $? and performs error handling as desired. You can also extend it to do things such as check that tape before starting the backup.
I wouldn't recommend using the -m option , the -i is good enough though I do also use the -p option after having had packing problems with some tape drives.
To test the first 3 images, use the following commands. All this
does is checks for tape media errors. If you want to be absolutely
sure, boot the tape.
# The first 3 images are always written in 512 byte blocks
#
chdev -l rmt0 -a block_size=512
dd if=/dev/rmt0.1 of=/dev/null
dd if=/dev/rmt0.1 of=/dev/null
dd if=/dev/rmt0.1 of=/dev/null
To test the 4th image, use the commands:
# The system backup image is written at whatever block size the
# tape device was set to when the mksysb was made. You might
# assume 512 and skip the commands up through 'chdev' and the
# optional 'ibs' parameter to dd in the subsequent section. If
# you do and the block size is not 512, you'll get an I/O error.
#
tctl rewind
restore -xqvf /dev/rmt0.1 -s2 ./tapeblksz
chdev -l rmt0 -a block_size=$(awk '{ print $1 }' tapeblksz)
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.