Dear Managers,
I have been trying to get a script to work which will shut Oracle down, umount
the file systems. I then remount them as read only, back them up using 'vdump'
and then remount the file systems and start Oracle.
The script file which is appended to the end of this message works perfectly if
you run the script interactively. It also works if you use the 'at' command to
run this script once.
The problem arises when you create a crontab entry to run the script at night.
>From the log file the script does everything it is supposed to execpt 'vdump'
the file systems.
I the tests I ran, I always have a tape mounted and rewound yet I have not got
this cron job to do a 'vdump' yet.
I maybe missing something, but I do not know what.
Does anyone have any suggestions ?
Cheers
Chris
SCRIPT FILE
#!/sbin/sh
LOG=/usr/logs/oracle_backup.log
export LOG
# Run Oracle shutdown script
#
/sbin/init.d/oracle 'stop' > $LOG
# Umount Projects/Oracle File Systems in sequence
#
umount -v /u01/indexes >> $LOG
umount -v /u01 >> $LOG
# Mount the two Oracle mount points Read Only
#
mount -r -v /u01 >> $LOG
mount -r -v /u01/indexes >> $LOG
# vdump the file systems to the default tape device
#
echo dumping now... >> $LOG
vdump -0uN /u01 >> $LOG 2>&1
vdump -0u /u01/indexes >> $LOG 2>&1
echo done dumps >> $LOG
umount -v /u01/indexes >> $LOG
umount -v /u01 >> $LOG
mount /u01
mount /u01/indexes
# Restart Oracle
#
/sbin/init.d/oracle 'start' >> $LOG
exit
************************************************************************
This is the log file generated :-
stopping V2 listener
stopping Oracle databases
dumping now...
done dumps
starting V2 listnener
starting Oracle database
Received on Tue Oct 10 1995 - 12:44:47 NZDT