RMAN Incremental Level 0 Database Backup Scripts in Oracle

September 28, 2021
()

RMAN Incremental Level 0 Database Backup Scripts in Oracle


In this article, we are going to prepare a script for RMAN Incremental Level 0 (L0) database backup which includes backup of datafiles (L0), control files, spfile along with archives.

RMAN incremental backups back up only datafile blocks that have changed since a specified previous backup. You can make incremental backups of databases, individual tablespaces, or datafiles. A level 0 incremental backup, which is the base for subsequent incremental backups, copies all blocks containing data, backing the datafiles up into a backup set just as a full database backup.

Generally, we do take backup of the database every day as scheduled and business continuity either FULL or INCREMENTAL but sometimes also we do take backup manually whenever require like prior to schedule activities, migration/restore purpose, before the upgrade, etc. In this demonstration, we will prepare RMAN Incremental Level 0 (L0) scripts which will create a backup in a specified location (local directory) on the database server and also in Flash Recovery Area (FRA).

OPTION 01: Incremental LEVEL 0 (L0) command to take database backup using RMAN utility in a specified location (local directory) on the database server, click here for the complete output of the command.

RMAN> run
{
ALLOCATE CHANNEL CH1 DEVICE TYPE DISK FORMAT '/oradata/backup/LABDBDUP/labdbdup_%U';
ALLOCATE CHANNEL CH2 DEVICE TYPE DISK FORMAT '/oradata/backup/LABDBDUP/labdbdup_%U';
BACKUP tag 'INCR0_DB' INCREMENTAL LEVEL=0 DATABASE PLUS ARCHIVELOG;
BACKUP CURRENT CONTROLFILE TAG 'INCR0_CTL' FORMAT '/oradata/backup/LABDBDUP/labdbdupCTL_%U';
BACKUP SPFILE TAG 'INCR0_SPFILE' FORMAT '/oradata/backup/LABDBDUP/labdbdupSPF_%U';
RELEASE CHANNEL CH1;
RELEASE CHANNEL CH2;
}
$ cd /oradata/backup/LABDBDUP/
$ ls -lrt


OPTION 02: Incremental LEVEL 0 (L0) command to take database backup using RMAN utility in Flash Recovery Area (FRA) on the database server, click here for the complete output of the command.

RMAN> run
{
ALLOCATE CHANNEL CH1 DEVICE TYPE DISK;
ALLOCATE CHANNEL CH2 DEVICE TYPE DISK;
BACKUP tag 'INCR0_DB' INCREMENTAL LEVEL=0 DATABASE PLUS ARCHIVELOG;
BACKUP CURRENT CONTROLFILE TAG 'INCR0_CTL';
BACKUP SPFILE TAG 'INCR0_SPFILE';
RELEASE CHANNEL CH1;
RELEASE CHANNEL CH2;
}
cd /oradata/LABDBDUP/FRA/LABDBDUP/autobackup/2021_09_27/
$ ls -lrt


We always encourage the technical person to visit 
section SCRIPTS to get more daily usage SQL commands.


Hope so you like this script
!
Please share your valuable feedback/comments/subscribe and follow us below and don’t forget to click on the bell icon to get the latest update. Click here to know more about our pursuit.


Related Articles



Loading

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

<strong>Hello and welcome to DBsGuru,</strong>DBsGuru is a group of experienced DBA professionals and serves databases and their related community by providing technical blogs, projects, training. Technical blogs are the source of vast information not about databases but its related product like middleware, PL/SQL, replication methodology, and so on.Thanks for the visits!<strong>Share Learn Grow!</strong>

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *