Monday, October 11, 2010

RMAN Configuration


The default RMAN configuration may be changed as per need. Here is sample configuration change and also changing it back to default setting.

Connect to database using RMAN
$ rman target / nocatalog

# to check the current configuration

show all;


# Configure backups to be written to disk.
CONFIGURE DEFAULT DEVICE TYPE TO DISK;

# Configure RMAN to keep at least 5 backups of each datafile.
# If you have certain backups which must be retained longer than this
# retention policy, you can use the KEEP option with the BACKUP command when
# creating those backups.

configure  RETENTION POLICY TO redundancy 2 ;

# Configure RMAN to use two disk channels for backup, restore, recovery, and
# maintenance operations.

CONFIGURE DEVICE TYPE DISK PARALLELISM 2;

# Configure RMAN to write disk backups to the /backup directory.
# The format specifier %t is replaced with a 4-byte timestamp, %s with the
# backup set number, and %p with the backup piece number.

CONFIGURE CHANNEL DEVICE TYPE DISK clear ;
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/oratbkup/oracle/BACKUP/testdb/ora_df%t_s%s_s%p';
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/oratbkup/oracle/BACKUP/testdb/ora_df%t_s%s_s%p';

CONFIGURE CHANNEL 3 DEVICE TYPE DISK clear;

# Configure RMAN to back up the control file after each backup.
CONFIGURE CONTROLFILE AUTOBACKUP ON;

# Configure RMAN to write controlfile autobackups to the /backup directory.
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oratbkup/oracle/BACKUP/testdb/ora_cf_%F';

# Configure RMAN to use shared Snapshot Control File location.
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oratbkup/oracle/BACKUP/testdb/snapshot/snap_testdb.cf';


Hope this help. Regards Rupam