Explore the RMAN_05 Incremental backup link in ORACLE: Explore the RMAN_01 concept in 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 In the previous blog posts, I mentioned consistency backup and non-Consistency backup for databases. They all belong to full backup and data backup. Each backup is to back up all blocks, today we will talk about Incremental backup, which can effectively save storage space and the time required for backup. Www.2cto.com 1. What is Incremental backup? What is Incremental Backup? There are two types of Incremental Backup: Differential Incremental Backup and CumulativeBackup. When using RMAN to create a backup set, all data blocks of the backup data file are used by default. This backup is also called a full backup, while Incremental Backup only backs up the changed data blocks since the last backup. You can use incremental backups of RMAN to back up data files, tablespaces, and databases, while minimizing backup files. Note: Before Oracle10g, differential incremental backup and cumulative incremental backup both include five backup levels: 0, 1, 2, 3, 4, and 5, however, in Oracle 10 Gb, there are only 0 and 1 levels, of which 0 is equivalent to full backup. 2. Differential Incremental Backup: Differential Incremental Backup Level 1 backup data blocks with the latest Incremental Backup (differential incremental backup and cumulative incremental backup) changes. If you want to perform Level 1 Incremental backup, RMAN backup changes the data blocks after the last level 1 Incremental backup; if you have not performed Level 1 backup before, back up data blocks that have changed since the execution level 0. If no backup has been performed, Rman copies all data blocks that have changed since the creation of the file, otherwise, a backup with a level of 0 will be executed. For incremental differential backup, see Figure 1. On Sunday, www.2cto.com executes an incremental backup with a level of 0. On Monday and Saturday, an incremental backup with a level of 1 is called a backup of data blocks that have changed since the previous backup.
(Figure 1) 3. Cumulative Incremental Backup: a cumulative incremental backup refers to a data block that has changed since the last backup of level 0. Cumulative Incremental Backup can reduce the recovery time. The cumulative incremental backup is shown in figure 2.
(Figure 2) in Figure 2, the database is backed up at 0 on Sunday. Perform a 1-level Incremental backup from Monday to Saturday. You can see that the cumulative incremental backup is the data block modified since the backup level 0. Accumulative incremental backup increases the backup time. However, because data needs to be restored from fewer backup sets during recovery, accumulative Incremental Backup will save more time than differential incremental backup. 2. How to create an incremental backup in Oracle 9i, as long as it is an incremental backup, all data blocks in the Database need to be compared. This process takes a long time, and because Incremental Backup creates multiple backup sets that cannot be accessed, the recovery becomes more unreliable and slower. Generally, it is not very useful, but it is still very good for large data warehouse systems. OLTP systems generally do not have to choose Incremental backup on 9i databases.
However, when Oracle reaches 10 Gb, Incremental Backup has been greatly improved. Implements Incremental backup to a real backup. The unique incremental log makes it unnecessary for RMAN to compare each data block in the data block. However, the cost is to increase the disk I/O. In addition, Oracle combines the Incremental Backup results with 10 Gb of backup to reduce the recovery time. Incremental Backup requires a base. Zero-set backup and zero-level backup are the basis of all Incremental backup. The difference between level 0 Incremental backup and full backup is that level 0 backup can be used as the basic backup for other Incremental backup, but not for full backup. The following are the differences between the increment of level 0, increment of level 1, and increment of level 1 difference. Level 0 backup: RMAN> backup incremental level 0 database; Starting backup at 24-MAY-12 www.2cto.com using target database control file instead ofrecovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: sid = 139 devtype = DISKchannel ORA_DISK_1: starting incremental level 0 datafile backupsetchannel ORA_DISK_1: specifying datafile (s) inbackupsetinput datafile fno = 00001 name =/DBData/WWL/system01.dbfinput datafile fno = 00003 name =/DBData/WWL/Invalid datafile fno = 00002 name =/DBData/WWL/Your datafile fno = 00004 name =/DBData/WWL/users01.dbfchannel ORA_DISK_1: starting piece 1 at 24-MAY-12channel ORA_DISK_1: finished piece 1 at 24-MAY-12piece handle =/DBBak/done = encrypted comment = NONEchannel ORA_DISK_1: backup set complete, elapsedtime: 00: 00: 56 Finished backup at 24-MAY-12 Starting Control File and SPFILE Autobackup at24-MAY-12piecehandle =/DBSoft/product/10.2.0/db_1/dbs/c-5520179-20120524-00 comment = NONEFinished Control File and SPFILE Autobackup at 24- MAY-12 level 1 Cumulative incremental backup RMAN> backup incremental level 1 cumulativedatabase; www.2cto.com Starting backup at 24-MAY-12using channel ORA_DISK_1channel ORA_DISK_1: starting incremental level 1 datafile backupsetchannel ORA_DISK_1: specifying datafile (s) inbackupsetinput datafile fno = 00001 name =/DBData/WWL/system01.dbfinput datafile fno = 00003 name =/DBData/WWL/Invalid datafile fno = 00002 name =/DBData/WWL/Your datafile fno = 00004 name =/DBData/WWL/users01.dbfchannel ORA_DISK_1: starting piece 1 at 24-MAY-12channel ORA_DISK_1: finished piece 1 at 24-MAY-12piece handle =/DBBak/done = encrypted comment = NONEchannel ORA_DISK_1: backup set complete, elapsedtime: 00: 00: 35 Finished backup at 24-MAY-12 Starting Control File and SPFILE Autobackup at24-MAY-12piecehandle =/DBSoft/product/10.2.0/db_1/dbs/c-5520179-20120524-01 comment = NONEFinished Control File and SPFILE Autobackup at24-MAY-12 RMAN> level 1 incremental differential backup: RMAN> backup incremental level 1 database; Starting backup at 24-MAY-12using channel ORA_DISK_1channel ORA_DISK_1: starting incremental level 1 datafile backupsetchannel ORA_DISK_1: specifying datafile (s) inbackupsetinput datafile fno = 00001 name =/DBData/WWL/system01.dbfinput datafile fno = 00003 name =/DBData/WWL/Invalid datafile fno = 00002 name =/DBData/WWL/Your datafile fno = 00004 name =/DBData/WWL/users01.dbfchannel ORA_DISK_1: starting piece 1 at 24-MAY-12channel ORA_DISK_1: finished piece 1 at 24-MAY-12piece handle =/DBBak/done = encrypted comment = NONEchannel ORA_DISK_1: backup set complete, elapsedtime: 00: 00: 35 Finished backup at 24-MAY-12 www.2cto.com Starting Control File and SPFILE Autobackup at24-MAY-12piece handle =/DBSoft/product/10.2.0/db_1/dbs/c-5520179-20120524-02comment = NONEFinished Control File and SPFILE Autobackup at24-MAY-12 RMAN> author Wu weilong