Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Schedule backup jobs with crontab in Linux

user13148231Oct 25 2010 — edited Oct 25 2010
WE have Oralce 11.2.01 on Redhat 5.2, and I tried schedule backup with crontab as
15 1 * * 1 /home/oracle/bin/backup_0.sh > /home/oracle/ftpf/rman/rman0.log
20 1 * * 0,2,3,4,5,6 /home/oracle/bin/backup_1.sh >> /home/oracle/ftpf/rman/rman_level1.log
The 1st entry is the level 0 backup and 2nd is level 1. The level 1 shell script is
#!/bin/sh
echo '========================================='
date
cd /home/oracle/ftpf/rman
rman target / CMDFILE cmd_rman1
and the command file is
backup incremental level 1 tag 'level_1' as compressed backupset database plus archivelog;
The level 1 backup schell script executes every morning except Monday and output in log file like
.......
=========================================
Thu Oct 21 01:20:01 CDT 2010
=========================================
Fri Oct 22 01:20:01 CDT 2010
=========================================
Sat Oct 23 01:20:01 CDT 2010
The RMAN comands appear not executed. BUt if I run the same command in shell prompt like
/home/oracle/bin/backup_1.sh >> /home/oracle/ftpf/rman/rman_level1.log
the command runs through and backups take. The same is for the level 0 schedule.

Why is that? Hope someone can share his schedule experience or work around with me.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 22 2010
Added on Oct 25 2010
3 comments
4,563 views