Creating RMAN backups using Commvault

0

One of our customers decided to migrate to Commvault for creating their backups. First they started with OS file backups, but finally they also want to create backups of the Oracle database with Commvault.
Commvault is not replacing RMAN. In fact Commvault generates RMAN commands/scripts which are run on the Oracle database. It can make backups to a storage server.

In this blog article I would like to describe a possible way to make RMAN backups with Commvault. The method described here makes Full, incremental and archivelog backups to an external storage and also makes a Oracle Recommended Backup in the local FRA of the database. So in fact a twofold backup approach is used here: The first one is a classical Full and Incremental backup approach to external storage. The other one is a Oracle Recommended Backup approach to the “local” FRA.

We implement this approach by two Commvault jobs:
1. Full Incremental. This one runs with a frequency of every day.
2. Incremental. This one runs every 4 hours.
The terms used in Commvault are a little bit different from the ones used in Oracle. Therefore these terms can confuse the “standard” Oracle dba a little bit.

The full incremental backup job we execute consists of the following steps:
1. Full backup: to external commvault storage

a. full backup = incremental level 0 backup to external commvault storage
b. autobackup controlfile to external commvault storage

2. Oracle Recommended backup: to FRA on local server

a. backup incremental level 1 for recover of copy: to FRA
b. recover of copy of database: in FRA
c. autobackup controlfile: to FRA

3. backup of archivelog: to external commvault storage

a. backup of archivelog: to external commvault storage
b. autobackup controlfile: to external commvault storage

The incremental backup job consists of:
1. Incremental level 1 backup: to external commvault storage

a. incremental level 1 backup to external commvault storage
b. autobackup controlfile to external commvault storage

2. Oracle Recommended backup: to FRA on local server

a. backup incremental level 1 for recover of copy: to FRA
b. recover of copy of database: in FRA
c. autobackup controlfile: to FRA

3. backup of archivelog: to external commvault storage

a. backup of archivelog: to external commvault storage
b. autobackup controlfile: to external commvault storage

 

Creating a backup job in Commvault:

The following steps should be executed to implement this backup strategy:

First the Commvault console should be started in a browser. That should be done by opening the following URL:

http://[servername].[domainname]/console/

You then should provide your credentials in order to login.

step 1: configure storage policies

Go to Client Computer Groups, select Oracle and then select the server you want to choose, in this case puhora0004. And then select Oracle under puhora0004. Click with the right mouse button on Oracle (the branch under puhora0004) and select properties:

The next screen will be shown:

The DATA Storage Policy and Log Storage Policy should be entered. The system engineer responsible responsible for the Commvault system already made a storage policy for Oracle named SP_NDC1_Oracle. So we entered this storage policy in these fields. See the screenprint above. Click OK.

Back in the last screen select the database under the puhora004-Oracle branch. In this example it is the PRIMRP1P database.

Click with the right mouse button on this database and select properties. Click on tab Storage Device. Then select in the field Storage Policy  … “SP_NDC1_Oracle”.

Click on sub-tab Log Backup (next to Command Line backup). Also enter the Log storage policy: “SP_NDC1_Oracle”

Click OK.

In the tab on the right select default:

Click with the right mouse button and select Properties. Select tab Storage Device. Select Storage Policy: SP_NDC1_Oracle:

 

Select tab Advanced  and if necessary sub tab Backup Arguments
Enter the field Backup Tag. In this example this is: COPY_DB :

 

Select sub tab Options and select Merge Incremental Image Copies:
(this one switches on Oracle Recommended Backup)

 

Choose tab Content. Select Selective Online Full:

In the Commvault version we used, there was a bug. This bug causes the storage policy under Oracle to disappear if you configure the storage policy in one of the underlying databases. So you should check after all the storage policies have been applied if all the storage policies are still there.

 

Step 2: Create a schedule policy

In the left pane go to Policies. And then choose Schedule Policies. Select with the right mouse button:  New Schedule Policy:

Provide your New Schedule Policy with a name.

Click on Agent type, select Oracle. And then click on the blue colored word Select:

Click on Add:
Select Full:

Choose tab Schedule Pattern: Fill this window for example with the following information:

Click OK.

You have now made a schedule for the full backup.
Choose your Start Time with care. Your incremental backup should be finished before you start a Full backup. If the incremental backup still is running on the scheduled start time of your full backup, your full backup will not start at all. So be sure your incremental backup will not be running on the Start Time you choose for the Full backup.

Next you make a schedule for the incremental backup.

Click Add, select Incremental:

Choose Schedule Pattern. Fill this window for example with the following information:

Click OK.
Next, click on tab Associations:

Look up under the Oracle branch the correct server and databases:
In this example these are the puhora0004, puhora0005 and puthkd17 servers
Select under the requested database the option default.

Click OK.

We have now made two scheduled jobs (full and incremental) that creates backups of 3 databases which are running on 3 different servers.

You could also decide to make a schedule which creates backups of all databases on 1 particular server.

How to view your backup history

You can view which backups have been made on your database with Commvault. To do that select in the left pane Client Computer Groups – Oracle – [servername – in our example puhora004]– Oracle – [database name – in our example PRIMRP1P] Click on PRIMRP1P with the right mouse button and select view and the Backup History.

Click OK on the following screen called Backup History Filter. Then you will see an overview of the backups that were made on this database.

You can view status of the job: Completed or Failed. You can find the type of backup: Full or Incremental. The Start Time, End Time, Duration can also be viewed on this screen.

It is also possible to view the rman log of a backup job. You can do this as follows:
Click on the backup to want to see. Click with your right mouse button on this backup. Choose View RMAN log:

Then you can read the log of the RMAN backup:

 

About Author

Oracle Consultant at AMIS

Leave a Reply

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