I have written this backup script.
However I want to add an "eject tape" and also some kind of error catching to say if the backup has failed.
Can anyone point me in the right direction.
#!/usr/bin/ksh
LOGFILE=/backups/newlog
# Rewind the tape
mt -f /dev/rmt1.1 rewind
# Do the backup
for x in / /usr /var /home /live /test /ckp /jnl /work /apps
do
echo "Backing Up $x" >> $LOGFILE
backup -0 -u -f /dev/rmt1.1 $x
done
# End Message
echo 'Backup Completed on'`date` >> $LOGFILE
# THE END
Thanks in advance.
However I want to add an "eject tape" and also some kind of error catching to say if the backup has failed.
Can anyone point me in the right direction.
#!/usr/bin/ksh
LOGFILE=/backups/newlog
# Rewind the tape
mt -f /dev/rmt1.1 rewind
# Do the backup
for x in / /usr /var /home /live /test /ckp /jnl /work /apps
do
echo "Backing Up $x" >> $LOGFILE
backup -0 -u -f /dev/rmt1.1 $x
done
# End Message
echo 'Backup Completed on'`date` >> $LOGFILE
# THE END
Thanks in advance.