06-24-2014 01:15 AM
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,
Solved! Go to Solution.
07-04-2014 04:05 AM
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
06-24-2014 01:32 AM
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.
06-24-2014 02:40 AM
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,
06-24-2014 02:52 AM
Duplicate Reply. Deleted.
06-24-2014 04:20 AM
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
06-24-2014 11:34 PM
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,
06-25-2014 01:26 AM
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.
06-25-2014 03:01 AM
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).
06-25-2014 03:08 AM
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).
06-25-2014 04:13 AM
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
06-25-2014 04:19 AM
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.
06-25-2014 04:23 AM
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).
06-25-2014 04:26 AM
By that I meant one VIP per node, yes.
I will check the document again and will let you know.
06-26-2014 12:15 AM
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.
06-29-2014 03:56 AM
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.
07-04-2014 04:05 AM
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