This post is a follow up on the Stop & Start script I made for Oracle Application Server 10g.
You will need to create a new bash script which would basically have the following lines and should be placed in /home/oracle/scripts/backupoas.sh
#THIS SCRIPT MUST BE RUN AS ROOT
su – oracle -c “cd /home/oracle/scripts/;./stopas.sh”
#Create Backup on this Machine in /backup/daily.tar
tar cvf – /backup/daily.tar /u01″
##END OF BACKUP SCRIPT
su – oracle -c “cd /home/oracle/scripts/;./startas.sh”
time_exec=`expr $(( $time_end – $time_start ))`
echo “Application Server Backup Execution time is $time_exec seconds”
To make the backup script better, put that in a crontab by issuing, crontab -e and adding the line 21 30 * * * /home/oracle/scripts/backupoas.sh.
DO NOT FORGET TO CHMOD 777 those script files