RMAN Full and incremental backup Script for Oracle Database

Following script will backup the complete database plus archivelog.
If you want to change the default option before running script.
You can configure the commands at RMAN Prompt with configure option as shown below:

configure backup optimization on;
configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to 'C:\archiva\backup\CTL_%F';
configure maxsetsize to unlimited;
configure device type disk parallelism 4;

Full RMAN Backup Script for the Database plus archive log.

run
{ 
allocate channel c1 type disk format 'C:\archiva\backup\%I-%Y%M%D-%U' maxpiecesize 5G;
allocate channel c2 type disk format 'C:\archiva\backup\%I-%Y%M%D-%U' maxpiecesize 5G;
allocate channel c3 type disk format 'C:\archiva\backup\%I-%Y%M%D-%U' maxpiecesize 5G;
allocate channel c4 type disk format 'C:\archiva\backup\%I-%Y%M%D-%U' maxpiecesize 5G;
backup as compressed backupset incremental level 0 check logical database plus archivelog;
release channel c1 ;
release channel c2 ;
release channel c3 ;
release channel c4 ;
}

For incremental database backup level 1, Use following script:

run
{ 
allocate channel c1 type disk format 'C:\archiva\backup\%I-%Y%M%D-%U' maxpiecesize 5G;
allocate channel c2 type disk format 'C:\archiva\backup\%I-%Y%M%D-%U' maxpiecesize 5G;
allocate channel c3 type disk format 'C:\archiva\backup\%I-%Y%M%D-%U' maxpiecesize 5G;
allocate channel c4 type disk format 'C:\archiva\backup\%I-%Y%M%D-%U' maxpiecesize 5G;
backup as compressed backupset incremental level 1 check logical database plus archivelog;
release channel c1 ;
release channel c2 ;
release channel c3 ;
release channel c4 ;
}
This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply