Related Links: Exploring the RMAN_01 concept of ORACLE http://www.bkjia.com/database/201205/132243.html Explore the basic use of RMAN_02 in ORACLE http://www.bkjia.com/database/201205/132329.html ; Explore ORACLE RMAN_02 consistent backup http://www.bkjia.com/database/201205/132664.html ; Explore ORACLE RMAN_03 non-consistent backup http://www.bkjia.com/database/201205/133139.html Explore ORACLE-based RMAN_04 non-consistent backup http://www.bkjia.com/database/201205/133374.html Explore the RMAN_05 Incremental backup of ORACLE http://www.bkjia.com/database/201205/133559.html Explore ORACLE's RMAN_06 backup policy. In the previous blog posts, we have finished all the backup content, however, in order to better adapt to the automatic backup requirements of enterprises, we can talk about how to build and plan a policy that can automatically back up data in today's course, this reduces DBA pressure and increases the probability of data recovery. 1. How to develop backup policies must follow the principles of recoverability and efficiency in formulating backup policies. Minimize disk overhead and recovery time when formulating backup policies. 1.1 implement regular backup by editing the backup script: create level 0 Incremental backup run {allocate channel c1 type disk; ---- allocate backup channel allocate channel c2 type disk; allocate channel c3 type disk; backup incremental level 0 tag 'leve0' format ---- define backup level '/volume/level0/leve0% u _ % s _ % P' database ---- set backup file storage path include current controlfile; ---- backup control file SQL 'alter system archive log current'; backup filesperset 3 format ---- backup archive log'/volume/archiv/arch_leve0 _ % U _ % s _ % P' archivelog all delete input; --- delete the release channel c1 after the archive log is backed up; --- Close the channel, which corresponds to the allocate above. Release channel c2; release channel c3;} create a level-1 Incremental backup run {allocate channel c1 type disk; allocate channel c2 type disk; allocate channel c3 type disk; backup incremental level 1 tag 'leve1' format'/volume/level1/leve1 % u _ % s _ % P' database include current controlfile; SQL 'alter system archive log current '; backup filesperset 3 format'/volume/archiv/arch_leve1 _ % u _ % s _ % P' archivelog all delete input; release channel c1; release channel c2; release channel c3 ;} create Level 2 Incremental backup run {allocate channel c1 type disk; allocate channel c2 type disk; allocate channel c3 type disk; backup incremental level 2 tag 'leve1' format'/volume/level2/leve2 % u _ % s _ % P' database include current controlfile; SQL 'alter system archive log current '; backup filesperset 3 format'/volume/archiv/arch_leve1 _ % u _ % s _ % P' archivelog all delete input; release channel c1; release channel c2; release channel c3 ;} 1.2 Develop an effective scheduler task (refer to the method in the previous blog ): week difference increment Sunday 0 level Monday 1 level Tuesday 1 level wedsday 1 level Friday 2 level Saturday 2 level [oracle @ ora01scripts] $ crontab-l 0 2 ** 0 hour Lerman target /partition file = '/opt/data/scripts/leve0.sh' 0 2 ** 1 specify Lerman target/partition file = '/opt/data/scripts/leve1.sh' 0 2 ** 2 Specify Lerman target /partition file = '/opt/data/scripts/leve1.sh' 0 2 ** 3 then Lerman target/partition file = '/opt/data/scripts/leve1.sh' 0 2 ** 4 then Lerman target /partition file = '/opt/data/scripts/leve1.sh' 0 2 ** 5 partition Lerman target/partition file = '/opt/data/scripts/leve2.sh' 0 2 ** 6 partition Lerman target /configure file = '/opt/data/scripts/leve2.sh' by Wu weilong