1, the system: the use of Linux crontab scheduled call Shell, the implementation of Rman
[Oracle@db]$ crontab-l
0 1 * * 0/u01/bak/rman/script/inc0.sh
0 1 * * 1/u01/bak/rman/script/inc2.sh
0 1 * * 2/u01/bak/rman/script/inc2.sh
0 1 * * 3/u01/bak/rman/script/inc2.sh
0 1 * * 4/u01/bak/rman/script/inc1.sh
0 1 * * 5/u01/bak/rman/script/inc2.sh
0 1 * * 6/u01/bak/rman/script/inc2.sh
2. Related scripts
DRWXRWXRWX 2 Oracle oinstall 4096 03-10 08:19 Log
-RW-------1 Oracle oinstall 4458 03-09 17:37 nohup.out
-RWXRWXRWX 1 Oracle oinstall 03-09 09:37 CONNECT.RCV
-RWXRWXRWX 1 Oracle oinstall 03-08 16:17 INC0.RCV
-RWXRWXRWX 1 Oracle Oinstall 165 03-08 16:17 inc0.sh
-RWXRWXRWX 1 Oracle oinstall 03-08 16:17 INC1.RCV
-RWXRWXRWX 1 Oracle Oinstall 163 03-08 16:17 inc1.sh
-RWXRWXRWX 1 Oracle oinstall 03-08 16:17 INC2.RCV
-RWXRWXRWX 1 Oracle Oinstall 164 03-08 16:17 inc2.sh
3, inc0.sh content
Export Oracle_home=/home/oracle/product/10.2.0/db_1
Nohup $ORACLE _home/bin/rman CMDFILE=/U01/BAK/RMAN/SCRIPT/INC0.RCV log=/u01/bak/rman/script/log/inc0.log Append
4, INC0.RCV content
@@/u01/bak/rman/script/connect.rcv
run{
Execute global script global_inc0;
}
Exit
5, to see what GLOBAL_INC0 is
-----is a script registered in Rman
Replace global script GLOBAL_INC0
Comment ' A script for backup database using incremental level 0 '
{
Execute global script GLOBAL_DEL_OBSO;
Allocate channel CH1 device type disk;
Set limit channel CH1 readrate=10240;
Set limit channel CH1 kbytes=2048000;
Backup as compressed Backupset incremental level 0 database
format= '/u01/bak/rman/inc0_%d_%u '
tag= ' Inc0 ';
Release channel CH1;
Execute global script Global_arch;
Execute global script Global_bkctl;
}