Optimized Incremental Backups
·
When you enable block change tracking, Oracle tracks the physical location of all database changes.
·
RMAN automatically uses the change tracking file to determine which blocks need to be read during an incremental backup and directly accesses that block to back it up.
·
When block change tracking is not enabled, then the entire datafile is read during each incremental backup to find and backup only the changed blocks, even if just a very small part of that file has changed since the previous backup. Use the following command to enable block change tracking.
·
The fact that block change tracking is available only with the enterprise edition.
·
Starting with Oracle 10g RMAN can take incremental backups without having to read the entire datafiles in order to find out which blocks have changed since the last backup.
·
This new feature is called FAST INCREMENTAL BACKUP.
·
The new technology used for this feature is called BLOCK CHANGE TRACKING.
·
When using Oracle block change tracking we see this procedure. As data blocks change, the Change Tracking Writer (CTWR) background process tracks the changed blocks in a private area of memory. When a commit is issued against the data block, the block change tracking information is copied to a shared area in Large Pool called the CTWR buffer. During the checkpoint, the CTWR process writes the information from the CTWR RAM buffer to the change-tracking file.
·
After enabling change tracking, the first level 0 incremental backup still has to scan the entire datafile , as the change tracking file does not yet reflect the status of the blocks. Subsequent incremental backup that use this level 0 as parent will take advantage of the change tracking file.
SQL>show parameter create;
----check db_create_file_dest
mkdir -p /home/oracle/file_create
SQL> alter system set db_create_file_dest=’/home/oracle/file_create’;
System altered.
----Now we can enable block change tracking
SQL> alter database enable block change tracking;
Database altered.
Sql>ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;
SQL> desc v$block_change_tracking
SQL> select * from v$block_change_tracking;
SQL> select * from v$block_change_tracking;
By making incremental backups and the change tracking file part of your backup strategy you can
• reduce the amount of time needed for daily backups.
• save network bandwidth when backing up over a network.
• reduce the backup file storage. Depending on the number of updated blocks and the frequency of backups, an incremental backup will be smaller than a full database backup and consumes less storage.
• enable fast backups of changed blocks.