Friday, January 29, 2010

Compressed, Full and Incremental Backups

Compressed Backups
New with 10g RMAN is capability to compress backups. In previous versions, reducing the size of backups was performed by backing up only used blocks and skipping unused blocks. With 10g, you can now compress backups regardless of the contents of the datafiles. This allows real compression of backups. Compressed backups works only with backup sets, not image copies. This includes database, tablespace, and datafile backup sets.

RMAN> backup as compressed backupset database;

A default device can be configured for compressed backups.
RMAN> configure device type disk backup type to compressed backupset;

NOTE: Compressed database backup sets are compressed at approximately a 5-to-1 ratio, or 20 percent of the size of a standard backup set.

Full and Incremental Backups
The full and incremental backups are differentiated by how the data blocks are backed up in the target database. The full backup backs up all the data blocks in the datafiles, modified or not. An incremental backup backs up only the data blocks in the datafiles that were modified since the last incremental backup. The baseline backup for an incremental backup is a level 0 backup. A level 0 backup is a full backup at that point in time. Thus, all blocks, modified or not are backed up, allowing the level 0 backup to serve as a baseline for all future incremental backups. Benefit of incremental backup is that it is quicker, because not all data blocks need to be backed up.
There are two types of incremental backups: differential and cumulative. Both differential and cumulative backups backup only modified blocks.
Differential incremental backup backs up only data blocks modified since the most recent backup at the same level or lower. It is the default incremental backup. The cumulative incremental backup backs up only the data blocks that have changed since the most recent backup of the next lowest level or n-1 or lower (with ‘n’ being the existing level of backup).

NOTE: Full backups do not mean the complete database was backed up.

Performing Differential Incremental Backup
RMAN> backup incremental level 0 database;

Next, take level 1 incremental backup after some data has been changed in the database. The incremental level 1 backup will pick up the changes since the level 0 backup.
RMAN> backup incremental level 1 database;

Performing Cumulative Incremental Backup
It requires more space than incremental back ups. The benefit of this is that cumulative incremental backups are usually faster and easier to restore because only one backup for a given level is needed to restore.

RMAN> backup incremental level 1 cumulative database;

No comments:

Post a Comment