How to take oracle database incremental backup with RMAN backup utility – RMAN Part-3

In my earlier article, I have covered “How to backup oracle database in Archivelog and NoArchivelog mode with RMAN backup utility”.

Here, Now I am going to explain RMAN Incremental backup terminologies and how to make incremental backups of your database.

What is Incremental backup?

Incremental backup is a backup who takes backup of only those blocks who modified ( i.e. block level changes done ) after full/incremental database backup. Incremental. backups are smaller and takes less time to backup as compared to full RMAN database backup.

While taking first incremental backup, it will be count as level 0 incremental backup, which is same in content to RMAN full backup and takes backup of all blocks in the database. Level 1 incremental backup takes backup of only those blocks who modified after earlier incremental backup.

There are two levels of incremental backup:

  • Cumulative: In which backup considered all modified blocks to backup right after last level 0 incremental backup.
  • Differential: In which backup considered all modified blocks to backup right after recent incremental backup. Default: differential.

Lets consider small scenario and you will get total idea of what is differential and what is cumulative incremental backup:
Consider we have big organizational data with huge size, whose full and incremental backup scheduled are as follows:

Sun: Full RMAN backup @ 9pm.
Mon: Differential incremental backup @ 9pm.
Tue: Differential incremental backup @ 9pm.
Wed: Cumulative incremental backup @ 9pm.

Now consider we got worst scenario of data loss:

Scenario 1:

In case of worst situation occurs on Monday after backup, If we want to recover database till Monday than RMAN will consider Sunday:full RMAN backup + Monday:differential incremental backup to recover database.

Scenario 2:

In case of worst situation occurs on Tuesday after backup, If we want to recover database till Tuesday than RMAN will consider Sunday:full RMAN backup + Monday:differential incremental backup + Tuesday:differential incremental backup to recover database.

Scenario 3:

In case of worst situation occurs on Wednesday after backup, If we want to recover it till Wednesday than RMAN will consider Sunday: full RMAN backup + Wed: Cumulative incremental backup to recover database. because cumulative backup already backed up all modified blocks changes of Monday, Tuesday & Wednesday in one time, in this case no need to apply differential backup of Monday and Tuesday.

Lets consider hands-on on how to take Incremental backups:

To take Level 0 incremental backup, issue the following command on RMAN prompt:

RMAN> backup incremental level 0 database;

To take Level 1 incremental backup, issue the following command:

RMAN> backup incremental level 1 database;

To take Level 1 cumulative incremental backup, issue the following command:

RMAN>backup incremental level 1 cumulative database;

 

With the help of above RMAN commands, you can take database incremental backups.

This is all about RMAN Incremental backup terminologies and how to make incremental backups of your database.

Stay tune. 🙂

8 thoughts on “How to take oracle database incremental backup with RMAN backup utility – RMAN Part-3”

  1. Well structured and compact article. Too bad about the English. Letting a native speaker proof-read would greatly increase the quality.

  2. Any body ever thought about the incremental backups(none level 0)? meaning: during the recovery process, 1. we restore a copy of the full backup, 2. restore required archivelog files, 3 starting recover database, if nothing wrong, we will have happily recover the database to what we wanted, Question: how the incremental backup getting in play? Some said the incremental was used behind the screen during the recover process? Is the away to verify this? I checked the alert.log files, I did not see any clue . My point is that we did a incremental rman backup, but never used!!!(BTW, we used netbackup to tape our rman backups)

    • Thank you Evan for writing and asking good question.
      Now consider following three scenarios:
      First scenario: I have weekly full backup taken on Sunday, and transactional log backups taken on Monday, Tuesday and Wednesday, In case of anything worst with my database, and there is need to restore database till Wednesday.
      What I will do, I will restore first full backup, then obviously all transactional log backups till Wednesday. Think if my transactional log not in place OR relocated somewhere on another storage/tape drive. than I Need to copy it to right location and will start restoring one by one. Its time consuming.

      Second scenario: I have weekly full backup taken on Sunday, and incremental backups on Monday, Tuesday and Wednesday, and same worst situation occurred and there is need to restore database till Wednesday.
      What I will do, I will just restore everything with single RMAN command, i.e. “Restore Database;” and RMAN will consider everything and restore my database till Wednesday. Less time consuming.

      Third scenario: I have weekly full backup taken on Sunday, and incremental backups on Monday, Tuesday and Wednesday, now there is no worst situation, I just only have to restore backup somewhere else for testing/reporting purpose till Tuesday.
      What I will do, I will only have to restore backup with Sunday, Monday and Tuesday tag. Less time consuming.

      your feedback/suggestions are highly appreciated.

  3. Primey Database SCN Number
    —————————–
    SQL> SELECT CURRENT_SCN FROM V$DATABASE;

    CURRENT_SCN
    ———–
    5.9701E+12

    ————————————————————–
    STANDBY DATABASE
    —————–
    Kindly check STANDBY DATABASE SCN Number

    SQL> SELECT CURRENT_SCN FROM V$DATABASE;

    CURRENT_SCN
    ———–
    5.9701E+09

    ———————————————————————————-
    PRIMERY:
    ——–
    run
    {
    allocate channel ch1 type disk;
    allocate channel ch2 type disk;
    allocate channel ch3 type disk;
    allocate channel ch4 type disk;
    backup as compressed backupset incremental from scn 5970039833490 database format ‘/backup/rman/inc_bkp/inc_backup_%U’;
    release channel ch1;
    release channel ch2;
    release channel ch3;
    release channel ch4;
    }

    alter database create standby controlfile as ‘/backup/rman/inc_bkp/control.std’;

    ——–
    STANDBY:
    ——–

    shut immediate
    replace exisintg controlfiles with new stdby controlfiles
    startup mount

    rman target /

    run
    {
    allocate channel ch1 type disk;
    allocate channel ch2 type disk;
    allocate channel ch3 type disk;
    allocate channel ch4 type disk;
    recover database noredo;
    release channel ch1;
    release channel ch2;
    release channel ch3;
    release channel ch4;
    }

Leave a Reply