DATABASE BACKUP USING RMAN
Hot backup means, taking the backup of the database while
it is up running.
1. DB_HOT_BACKUP Script
vi Backuprman.rc
---------------------------------------
run
{
allocate channel chnl1 device type disk;
allocate channel chnl2 device type disk;
backup database;
backup archivelog all;
backup current controlfile;
release channel chnl1;
release channel chnl2;
}
allocate channel chnl1 device type disk;
allocate channel chnl2 device type disk;
backup database;
backup archivelog all;
backup current controlfile;
release channel chnl1;
release channel chnl2;
}
----------------------------------------
$ rman target sys/<sys passwd> @ Backuprman.rc
Note :
1) here i have not specified any location for backup so it goes to default location. For details, please run “show all” command so that you will come to know where backup will go.
2) ensure that “controlfile autobackup is on;” If not please change the same using following command @ RMAN prompt.
CONFIGURE CONTROLFILE AUTOBACKUP ON;
2. Compressed DB_HOT_BACKUP Script
run
{
allocate
channel T1 type disk format 'E:\SPMATBACKUP\%d_%T_%t_%s';
allocate
channel T2 type disk format 'E:\SPMATBACKUP\%d_%T_%t_%s';
backup
as COMPRESSED BACKUPSET check logical database;
release
channel T1;
release
channel T2;
allocate
channel T1 type disk format 'E:\SPMATBACKUP\ARCH_%T_%t_%s';
backup
as COMPRESSED BACKUPSET archivelog all not backed up;
release
channel T1;
}
allocate
channel for maintenance type disk;
delete
noprompt obsolete device type disk;
release
channel;










