Monday, September 10, 2012

RMAN backup optimization


RMAN backup optimization is another feature to minimize backup size. Enabling this feature, RMAN BACKUP will skip backup of files that comes in certain condition or exactly identical to the file already backup up.

By Default it is set to OFF:

RMAN> SHOW BACKUP OPTIMIZATION;

RMAN configuration parameters for database with db_unique_name ORACLE are:
CONFIGURE BACKUP OPTIMIZATION OFF; # default

RMAN> CONFIGURE BACKUP OPTIMIZATION ON;

new RMAN configuration parameters:
CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters are successfully stored

RMAN>

Below are the criteria when RMAN check which files can be skipped from the backup.

In case of datafile RMAN compares the DBID, checkpoint SCN, creation SCN, and RESETLOGS SCN and time as a datafile already in a backup. If they are identical then skip to take backup again.

In case of archived redo log RMAN compares thread, sequence number, and RESETLOGS SCN and time.

In case of backupset RMAN compares recid and stamp.

Backup Optimization only applies to below rman commands:

BACKUP DATABASE
BACKUP ARCHIVELOG with ALL or LIKE options
BACKUP BACKUPSET ALL

Optimization feature can be override anytime by using FORCE option with backup command.

BACKUP DATABASE FORCE;

Log: 

Starting backup at 08-SEP-12
current log archived
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3074.294.793279165;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3075.307.793284119;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3076.298.793286989;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3077.297.793289297;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3078.382.793291555;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3079.395.793293577;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3080.381.793295619;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3081.299.793297653;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3082.403.793299621;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3083.408.793301609;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3084.362.793303497;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3085.355.793305483;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3086.364.793307311;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3087.306.793309275;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3088.292.793311117;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3089.283.793312945;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3090.365.793314877;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3091.356.793316867;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3092.410.793317693;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3093.281.793319779;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_06/thread_1_seq_3094.358.793322287;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_07/thread_1_seq_3095.368.793325083;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_07/thread_1_seq_3096.386.793326137;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_07/thread_1_seq_3097.290.793328655;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_07/thread_1_seq_3098.411.793332451;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_07/thread_1_seq_3099.360.793338931;
skipping archived log file +ASMFRA/tiger/archivelog/2012_09_07/thread_1_seq_3100.407.793343249;

1 comment:

  1. Hi, and how can we restore db using that backup with skipped datafiles? how to tell rman that skipped datafiles are present in other backup

    ReplyDelete