1、體系:採用LINUX CRONTAB定時計劃調用SHELL,執行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、相關指令碼
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 69 03-09 09:37 connect.rcv
-rwxrwxrwx 1 oracle oinstall 84 03-08 16:17 inc0.rcv
-rwxrwxrwx 1 oracle oinstall 165 03-08 16:17 inc0.sh
-rwxrwxrwx 1 oracle oinstall 84 03-08 16:17 inc1.rcv
-rwxrwxrwx 1 oracle oinstall 163 03-08 16:17 inc1.sh
-rwxrwxrwx 1 oracle oinstall 84 03-08 16:17 inc2.rcv
-rwxrwxrwx 1 oracle oinstall 164 03-08 16:17 inc2.sh
3、inc0.sh內容
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 內容
@@/u01/bak/rman/script/connect.rcv
run{
execute global script global_inc0;
}
exit;
5、看看global_inc0是什麼
-----是在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;
}