Saturday, April 26, 2008

About RMAN Incremental Backup

RMAN incremental backups back up only datafile blocks that have changed since a
specified previous backup.

Each data block in a datafile contains a system change number (SCN), which is the
SCN at which the most recent change was made to the block. During an incremental
backup, RMAN reads the SCN of each data block in the input file and compares it to
the checkpoint SCN of the parent incremental backup. If the SCN in the input data
block is greater than or equal to the checkpoint SCN of the parent, then RMAN copies
the block.

If you use block change tracking feature then RMAN can refer change tracking file the changed block in the datafile in stead of scanning the whole datafile. I will show in other topic how I can enable block change tracking.

Incremental Backup can be either level 0 or level 1 backup.

Level 0 Incremental Backup:
------------------------------------

A level 0 incremental backup is the base backup for subsequent incremental backups.

It copies all blocks containing data, backing the datafile up into a backup set just as a full backup would. The only difference between a level 0 incremental backup and a full backup is that a full backup
is not included in an incremental strategy. That is after taking full backup , you can’t perform incremental backup over it.

Level 0 backup of database is taken by

RMAN>BACKUP INCREMENTAL LEVEL 0 DATABASE;

Level 1 Incremental Backup:
------------------------------------------------------

Level 1 incremental backup can be two types,

1) Differential Level 1 Backup:
It backs up all blocks changed after the most recent
incremental backup at level 1.

If no level 1 found then backs up all blocks after most recent incremental backup at level 0.

If no level 1 and level 0 is found then the behavior is based on COMPATIBILITY settings.

If compatibility is >=10.0.0, RMAN copies all blocks changed since the file was created, and stores the results as a level 1 backup.

If compatibility <10.0.0, RMAN generates a level 0 backup.

This is the default level 1 incremental backup. Whenever you use
RMAN>BACKUP INCREMENTAL LEVEL 1 DATABASE;
differential backup is performed on database.

2) Cumulative Level 1 Backup: It backs up all blocks changed after the most recent incremental backup at level 0. Level 1 cumulative backup can be taken by,

RMAN>BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;

No comments:

Post a Comment