Offline Backup: Oracle Application Server 10g


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

time_start=`date +%s`

source /home/oracle/scripts/oas/settings.conf

##SHUTDOWN APPSERVER

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

##START APPSERVER

su – oracle -c “cd /home/oracle/scripts/;./startas.sh”

time_end=`date +%s`

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

Gulshan Yashveer Beejan

Gulshan holds a BSc(Hons) Computer Science with Distributed systems from the City University of London. He is currently working at DSOGroup(Mauritius) as a Linux Administrator on SaaS Solutions. More about Gulshan

Leave a Reply

Your email address will not be published. Required fields are marked *