Quick Oracle Backup via Templete

Posted on July 15, 2011

1


Today we are going to discuss the oracle databases Backup Activity via Veritas Netbackup Server. In this Activity we will discuss how to take the Backup of Oracle Databases.

Environment

Veritas Netbackup Server = 7.1

OS of Netbackup Server = win2003 R2

Netbackup Client version = 7.1

Client product = Oracle 11g r2

OS of Client = rhel 5.6

In this activity we will do the backup step by step as mentioned below.

  1. Some important Prerequisite
  2. Verify that RMAN is working
  3. Start Backup Archive and Restore and Creation of backup Script
  4. Mention script in Oracle Netbackup Policy
  5. Trigger Veritas Netbackup Policy for Backup

Some important Prerequisite

Link RMAN with Netbackup Server

In this Some Important Prerequisite topic we link the Oracle with Netbackup API library. We need to run theoracle_link script which automatically link Oracle with Netbackup API library. See the below snaps for to know how to run the script.

(Shutdown all oracle instances before running the oracle_link script. See the attached snaps in the end of Article to know how to shutdown the Oracle instances and how to start when the script run via Oracle Enterprise Manager)

Verify Archive Mode is ON

We need to ON the archive Mode ON so we can take the online hot backup of Oracle. To verify that the Archive Mode is ON run the archive log list command from SQL prompt. see the below snaps for reference.

Verify host file enteries of RHEL and Netbackup

a.) Host file entry of Veritas Netbackup Server

Insert the hostname and ip address of RHEL machine in the host file under the below path

“windows home\system32\drivers\etc”

b.) Host file entry of RHEL

Same thing we did in rhel OS. See the below snap of host file enteries of Veritas Netbackup Server and RHELmachine for reference:

Verify that RMAN is working

In this topic we will verify that the RMAN is working properly via taking the native backup of Oracle tablespace and a datafile because Netbackup uses RMAN. But first we will do minimal configuration of RMAN, Verify backup path, connect to RMAN and trigger backup of datafile and tablespace.

Configure RMAN

Connect to Oracle Enterprise Manager and go to the Policy tab under Backup Setting. See the below snap for reference. The first check box explains that the Control File and the parameter file (also means SPFILE) also backed up while backup of database.

The Second check box (in the above snap)means that the changed blocks (after a full backup) already known before triggering the incremental backups which make incremental backup process speedy as the backup activity will not read first how many blocks are changed after a full backup.

As you can see Disk Backup Location in the Device tab under Backup Setting which is the location where RMAN keeps backup (in native RMAN backup case). See the below snap for reference:

You will also see the Test Disk Backup button (in the above snap) which means that you can check the backup location is properly configured. Here also need the credentials of oracle user which must mention to check the Test Disk Backup. See the below snap for reference.

Disk Backup Test Successful will also be shown if the test will successful. See the below snap for reference:

Connect to RMAN

Now we will connect to RMAN to trigger the backup. See the below snap for reference

Trigger Backup

  1. Backup of data files

We need to know the datafile no. for backup of particular data file. See the below three snap for reference:

Snap # 1

Snap #2

Snap #3

  1. Backup of tablespace

Now In the below snap we take the backup of a single tablespace. In the first snap we will see the existing tablespace and in the second snap we will take the backup of one table space. See the below two snaps (Snap 3 and 4) for reference:

Snap # 3

Snap # 4

Start Backup Archive and Restore and Creation of backup Script

In this topic we will first create a backup script which we mention in the Backup Selection tab under the backup policy of Netbackup Server.

Start Backup Archive and Restore

Login to RHEL os with oracle user.

Now run the jbpsa  from the below higilighted directory

(Note: Make sure that the Oracle database is in the mount or open state.)

Now here you will see the Backup Archive and Restore and enter the oracle user credentials and the instance must be started

(Note: On UNIX systems, how you log onto NetBackup depends on how your Oracle

authentication is configured)

At this point you are logged in. Now here select the Oracle as the Policy Type. See the below snap for reference:

Script Creation

Now at this point we will go to create the Oracle Backup script which we will mention in the oracle policy under Veritas Netbackup Server. As you can see in the below snap select the orcl (make sure that the sub folders will also be selected as shown in the below snap too) and click the Backup button

Note:

1.) The NetBackup for Oracle backup wizard does not support all of the RMAN

commands and options that Oracle provides. Write a shell script if a template

does not provide all the functionality you require.

2.) You can use the bpdbsbora command to create a script from a backup template  )

Click on NEXT

Here you mention the sysdba credentials as shown in the below snap.

Now as shown in the below snap select the check box of “include archived redo log in backup” which will also take the backup of archive logs. Makesure if you dont want to delete archive log un check the “Delete archived redo log after are backed up”

Leave this setting as default and click on Next three times.

Now this is the last window where the script will be saved as per your mention name. In our case we save the sccript as oracle-nbu name. Now click on Finish to close this wizard.

Mention script in Oracle Netbackup Policy

Now we will mention the above created script in the Oracle Policy under Veritas Netbackup Server. I hope all knows how to create the Backup Policy in Veritas Netbackup Server. Creation of Backup Policy is not our cup of tea at this Article.

Trigger Veritas Netbackup Policy for Backup

Now its time to start taking the backup of Oracle via Veritas Netbackup Server. Take the backup of Oracle and verify in the Netbackup Catalog OR (I have created a tablespace name “ts1″ and a data file “df1″ in my test environment and triggered the backup policy. See the below snap as reference for backup verification.

I hope its very easy from this Article to understand how to take the Oracle Backup. I tried to make this Article very easy for all sort of viewers so that they can understand easily. Any comments will be appriciated.

Some useful links

http://www.symantec.com/business/support/index?pag…

How to Shutdown and Start Instance

About these ads