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 ;
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.