cancel
Showing results for 
Search instead for 
Did you mean: 

Netbackup Policy Configuration for Oracle 11gR2 RAC

riazjee
Level 4

Dear All,

 

We have Oracele 11gR2 Cluster on Windows 2008R2 and would like to configure the netbackup policies to backup the database.

Should we be using the SCAN Name as the client? Or the Servers (or VIPs)?

We don't want to tie the backup policy with any specific node or specific VIP. If any one of the node from the cluster is available, the backup should run fine.

Please advise how we can achieve that? I've reviewed the documentation but still confused about how to prcoeed.

 

Regards,

 

1 ACCEPTED SOLUTION

Accepted Solutions

Walker_Yang1
Level 5
Employee

Hi, riazjee

Sorry for misleading you regarding the usage of SCAN.

These days I made a testing in my testing envrionment, and found a way for your problem. Here is an example for your reference.

Configuration:

NBU build: 7601 | Master:Redhat 6 / Media:SuSE 11/ Client: windows 2008R2(two rac nodes)

Oracle Environment: 11gR2 | Windows 2008R2 RAC | One VIP for each node | One SCAN IP.| hostname: rac1,rac2| VIP name: rac1-vip, rac2-vip | service name: orcl | instance name: orcl1,orcl2

We use two VIPs as NBU client name in policy or not, which depends on if you use VIP name as your NBU client name during the installation of nbu client software on client. In other word, if you use VIP name as your nbu client name, so you should use two VIPs as client name in your policy, or use phsical hostname as your  client name in your policy. In my case, I use phisical hostnames, not VIP names. But both works.

I listed some key points for the sucussful backup.

1) Use physical hostname as client name in your policy, here is rac1, rac2.

2) Prepare backup scripts on rac node, modify some items based on default backup script, which is located at: C:\Program Files\Veritas\NetBackup\DbExt\Oracle\Samples\rman\hot_database_backup.cmd, as following,

@set ORACLE_HOME=C:\app\Administrator\product\11.2.0\dbhome_1

@set ORACLE_SID=orcl

@set TARGET_CONNECT_STR=sys/oracle@XXX

the following section, I just added one channel for archivelog and controlfile backup.

@(
echo RUN {
echo ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
echo ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
echo BACKUP
echo       %BACKUP_TYPE%
echo       FORMAT 'bk_u%%u_s%%s_p%%p_t%%t'
echo       DATABASE;
echo sql 'alter system archive log current';
echo RELEASE CHANNEL ch00;
echo RELEASE CHANNEL ch01;
echo # Backup all archive logs
echo ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
echo ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
echo BACKUP
echo       FILESPERSET 20
echo       FORMAT 'arch-s%%s-p%%p-t%%t'
echo       ARCHIVELOG ALL;
echo RELEASE CHANNEL ch00;
echo RELEASE CHANNEL ch01;
echo ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
echo ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
echo BACKUP
echo       FORMAT 'cntrl_%s_%p_%t'
echo       CURRENT CONTROLFILE;
echo RELEASE CHANNEL ch00;
echo RELEASE CHANNEL ch01;
echo }

NOTES: here you may notice the Net Service Name "XXX", yes you should configure this in tnsnames.ora file, located on your oracle installation directory: C:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora, add the following parts.

You could replace "XXX" with any one of the following, e.g. VIP, or PHY. As we could access oracle instance through VIP name or physical name, both works.

VIP =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

PHY =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac1)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac2)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

3. Save the above backup script on each RAC node. any locations, e.g. C:\racbackup.cmd

4. Specify the Backup Selections as "C:\racbackup.cmd".

5. Now we can run our policy.

6. After successful backup on one client, e.g. rac1, shutdown rac1, run policy again, the policy still worked, but you may find that there was a failed job for client rac1. Never mind, the backup will continue on rac2.

Hope helps.

thanks

View solution in original post

15 REPLIES 15

Marianne
Level 6
Partner    VIP    Accredited Certified

There are different backup options based on the RAC configuration in your environment.

All of this (with examples) are covered in Appendix A of NetBackup for Oracle Administrator's Guide 
 

Hope this helps.

riazjee
Level 4

Hi Marianne,

Thanks for the assistance.

We use ASM for storing datafiles & archivelogs.

Unfortunately I couldn't find anything relevant to my case in Appendix A.

 

Regards,

riazjee
Level 4

Duplicate Reply. Deleted.

Walker_Yang1
Level 5
Employee

Hi, riazjee

With VIPs or float IP, the backup should be fine when any one of nodes crashed.

If you have float IP, please directly use the float IP, which can connect any nodes when backups.

If you don't float IP, please use two VIPs in your backup scripts, each VIP connects one channel to database.

Hope helps.

thanks

riazjee
Level 4

Dear Walker_Yang,

Thanks for your feedback. Could you please let me know what is float IP?

So you mean in the policy, we will define two clients (with VIPs for both nodes)? How the script will look like?

 

Regards,

NBU_nbu
Level 4

VIP Name should be in the policy as a client.

set the VIP to reach a active node in the cluster property.

Node 1 is active

Node 2 is Passive , it will be failover if node1 is not reachable.

riazjee
Level 4

Should it be one VIP in the policy or ALL VIPs for all nodes?

 

Edited:

To clarify I am talking about Oracle RAC here (where we have 2-Nodes Active/Active).

riazjee
Level 4

So it should be one VIP only or ALL VIPs for ALL of the nodes?

 

To clarify, I am talking about 2-Node Oracle RAC (Active/Active).

Walker_Yang1
Level 5
Employee

hi, riazjee

Assume you have two VIPs, each node has a VIP, you should include two VIPs in your policy. In this way, if one node is down, the VIP of this failure node will be floated to other availabe node, your backup could continue to work.

In other hand, as you said, you have SCAN(float ip is similar like this), you can just use SCAN as client in your policy.

Here i post the rman script, you specify the connect parameter.(configure orcl1 and orcl2 in your tnsname.ora), in this way, at any time, one node down, you could backup through another VIP.

echo RUN {
echo ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' connect sys/password@orcl1;
echo ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' connect sys/password@orcl2;
echo BACKUP
echo       %BACKUP_TYPE%
echo       FORMAT 'bk_u%%u_s%%s_p%%p_t%%t'
echo       DATABASE;
echo sql 'alter system archive log current';
echo RELEASE CHANNEL ch00;
echo RELEASE CHANNEL ch01;
...}

hope helps.

thanks

Marianne
Level 6
Partner    VIP    Accredited Certified

Please help us to understand "ALL VIPs for ALL of the nodes"?

A Virtual IP address and virtual hostname is normally assiociated with an instance, not linked to physical nodenames. This means that the database can be accessed no matter where it runs - active/passive or active/active on 2 or more nodes.

Using VIP and Virtual hostname is covered under this topic in Appendix A of the NBU for Oracle Guide:

About virtual names and NetBackup for Oracle

Different naming schemes and load balancing configurations is discussed in this section.

So, you need to work with your Oracle team to determine best backup config for your environment. 

riazjee
Level 4

Wonderful explanation & example.

So if the node/VIP/instance/listener is down for one of the nodes due to whatever the issues, the backup will still continue, right?

 

Is it OK to use SCAN name as client because I see the following on http://www.symantec.com/business/support/index?page=content&id=HOWTO89686

 

Note:

Oracle 11g R2 Grid Infrastructure (CRS) includes the Single Client Access Name (SCAN) feature. This feature allows a single host name to resolve to multiple IP addresses each assigned to a different physical node in a cluster. Ensure that the client that appears in the NetBackup Oracle policy is not a SCAN. Also, ensure that any NB_ORA_CLIENT or CLIENT_NAME provided by the dbclient host in the backup request is not a SCAN. These names must reliably resolve on both the master server and the media server to an IP address that allows the server processes to connect to the dbclient host from which the backup request originated

If the SCAN host name is used in a NetBackup policy, this abstraction of the client name leads to backup and restore jobs failing with status 54. The client side fails with status 6 (backup) or status 5 (restore).

riazjee
Level 4

By that I meant one VIP per node, yes.

 

I will check the document again and will let you know.

Marianne
Level 6
Partner    VIP    Accredited Certified

Why would you have one VIP per node?

Each node normally has a fixed hostname and IP address, but the Instance can have a Virtual IP (VIP) and hostname that can be used no matter where the Instance is online.

As per the section in the manual:

A virtual name is a network host name resource (mapped to an IP address) that is
associated with an application. If it is possible, use virtual names for the clients.
When you use a virtual name for the client, you can specify a single client name
for all of the Oracle backups. This action lets NetBackup perform a restore to any
physical node.

 

As per the manual, you also need to find out if backup is load balanced across more than one node.

riazjee
Level 4

By Design, Oracle RAC has one VIP per node (Of course in addition to Physical IP of the server itself) so not sure about your question.

 

The issue is you can't rely on one VIP for the backups in a RAC Environment; there are many sceniros where the VIP of one of the nodes is DOWN (not mvoed to other node) but still clients are able to connect to database because at least one instance (and VIP of that server) is OK. So if you are talking about adding <N> VIPs (where N is the number of nodes in RAC) as the clients in the Netbackup Plicy, we are in agreement. We are OK if there is no load balancing but would prefer, if possible.

Walker_Yang1
Level 5
Employee

Hi, riazjee

Sorry for misleading you regarding the usage of SCAN.

These days I made a testing in my testing envrionment, and found a way for your problem. Here is an example for your reference.

Configuration:

NBU build: 7601 | Master:Redhat 6 / Media:SuSE 11/ Client: windows 2008R2(two rac nodes)

Oracle Environment: 11gR2 | Windows 2008R2 RAC | One VIP for each node | One SCAN IP.| hostname: rac1,rac2| VIP name: rac1-vip, rac2-vip | service name: orcl | instance name: orcl1,orcl2

We use two VIPs as NBU client name in policy or not, which depends on if you use VIP name as your NBU client name during the installation of nbu client software on client. In other word, if you use VIP name as your nbu client name, so you should use two VIPs as client name in your policy, or use phsical hostname as your  client name in your policy. In my case, I use phisical hostnames, not VIP names. But both works.

I listed some key points for the sucussful backup.

1) Use physical hostname as client name in your policy, here is rac1, rac2.

2) Prepare backup scripts on rac node, modify some items based on default backup script, which is located at: C:\Program Files\Veritas\NetBackup\DbExt\Oracle\Samples\rman\hot_database_backup.cmd, as following,

@set ORACLE_HOME=C:\app\Administrator\product\11.2.0\dbhome_1

@set ORACLE_SID=orcl

@set TARGET_CONNECT_STR=sys/oracle@XXX

the following section, I just added one channel for archivelog and controlfile backup.

@(
echo RUN {
echo ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
echo ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
echo BACKUP
echo       %BACKUP_TYPE%
echo       FORMAT 'bk_u%%u_s%%s_p%%p_t%%t'
echo       DATABASE;
echo sql 'alter system archive log current';
echo RELEASE CHANNEL ch00;
echo RELEASE CHANNEL ch01;
echo # Backup all archive logs
echo ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
echo ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
echo BACKUP
echo       FILESPERSET 20
echo       FORMAT 'arch-s%%s-p%%p-t%%t'
echo       ARCHIVELOG ALL;
echo RELEASE CHANNEL ch00;
echo RELEASE CHANNEL ch01;
echo ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
echo ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
echo BACKUP
echo       FORMAT 'cntrl_%s_%p_%t'
echo       CURRENT CONTROLFILE;
echo RELEASE CHANNEL ch00;
echo RELEASE CHANNEL ch01;
echo }

NOTES: here you may notice the Net Service Name "XXX", yes you should configure this in tnsnames.ora file, located on your oracle installation directory: C:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora, add the following parts.

You could replace "XXX" with any one of the following, e.g. VIP, or PHY. As we could access oracle instance through VIP name or physical name, both works.

VIP =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

PHY =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac1)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac2)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

3. Save the above backup script on each RAC node. any locations, e.g. C:\racbackup.cmd

4. Specify the Backup Selections as "C:\racbackup.cmd".

5. Now we can run our policy.

6. After successful backup on one client, e.g. rac1, shutdown rac1, run policy again, the policy still worked, but you may find that there was a failed job for client rac1. Never mind, the backup will continue on rac2.

Hope helps.

thanks