cancel
Showing results for 
Search instead for 
Did you mean: 

RAC Oracle backup script and config

santave
Level 4

Hi,

I have 3 nodes configured as oracle RAC (infdb1, infdb2 and infdb3)
PFA tnsnames.ora and hosts files configuration.

I would like to backup and restore with Failover VIP exists and backup is load balanced.
Anyone, can help me to give example backup and restore script for :

Backup Data + archive then delete archivelog
Backup arcvhive only then delete archivelog
DB Restore

Thanks a lot,
Santave

1 ACCEPTED SOLUTION

Accepted Solutions

Yasuhisa_Ishika
Level 6
Partner Accredited Certified

Two points to be considered for RAC .

One is policy configuration. There are 2 major options: single policy configuration(Automatic and Application Backup schedule on single policy) and two policy configuration(one have Automatic Backup schedule, and another have Application Backup schedule).

Another point to be considerd is how to allocate channels. 

These considerations are detailed in Guide. Please check  "Example RAC configuration: Failover VIP exists and backup is load balanced" in NetBackup 7.5 for Oracle Administrator'sGuide.
 
http://www.symantec.com/docs/DOC5175

To backup DBs and archive logs, start with sample script placed in /usr/openv/netbackup/ext/db_ext/oracle/samples/rman/. Replace "ALLOCATE CHANNEL" statement with those suggested in Guide. "RELEASE CHANNEL" statement is also required.

If you do not want to backup DB or control files, remove lines related to these objects from RMAN command section in your script.

View solution in original post

11 REPLIES 11

Yasuhisa_Ishika
Level 6
Partner Accredited Certified

Two points to be considered for RAC .

One is policy configuration. There are 2 major options: single policy configuration(Automatic and Application Backup schedule on single policy) and two policy configuration(one have Automatic Backup schedule, and another have Application Backup schedule).

Another point to be considerd is how to allocate channels. 

These considerations are detailed in Guide. Please check  "Example RAC configuration: Failover VIP exists and backup is load balanced" in NetBackup 7.5 for Oracle Administrator'sGuide.
 
http://www.symantec.com/docs/DOC5175

To backup DBs and archive logs, start with sample script placed in /usr/openv/netbackup/ext/db_ext/oracle/samples/rman/. Replace "ALLOCATE CHANNEL" statement with those suggested in Guide. "RELEASE CHANNEL" statement is also required.

If you do not want to backup DB or control files, remove lines related to these objects from RMAN command section in your script.

santave
Level 4

1. You mean, 1 policy for DB Data backup and 1 policy for archivelogs only? Both can't be in 1 policy?

2. How about the tnsname file, since my DB admin used PRECONNECT method.
Any necessary changes in this file to perfom load balance backup?

3. Also, how's the bp.conf configuration?

Thanks

Yasuhisa_Ishika
Level 6
Partner Accredited Certified

 

1. You mean, 1 policy for DB Data backup and 1 policy for archivelogs only? Both can't be in 1 policy?

NetBackup for Oracle requires two type of schedule - Automatic Backup & Application Backup. In Automatic Backup schedule, NetBackup just kicks backup script(or initiate RMAN command generated from template). Do not handle any backup operation in it. On the other hand, in Application Backup, NetBackup accepts backup requests from Oracle. When BACKUP commands is issued with SBT channel in RMAN, Oracle pass backup data through SBT and request NetBackup to store backup data into storage unit.

Following single policy configuration in RAC backup, you create one policy with both schedule. Or, following two policy configuration, you create two policy - one has only Automatic Backup schedule, and one has only Application Backup schedule. The former just kicks backup script, and the later handles all backup data from Oracle. These two policies are not deviced by type of Oracle DB object but by role of schedule in NetBackup.

2. How about the tnsname file, since my DB admin used PRECONNECT method.
Any necessary changes in this file to perfom load balance backup?

As shown in ALLOCATE CHANNEL example of Guide, you need node-specific name for erach node. But this tnsname.ora has SCAN adress only. You need to add entries of each node so that RMAN can connect to each node explicitly with dedicated name of each VIP. I'm not so familiar with Oracle, so for more detail, please show your DBAs the Guide and talk with them.

3. Also, how's the bp.conf configuration?

If I remember right, no need to modify bp.conf.

RadovanTuran
Level 4

Is there some advantage to to have automatic and application schedule in separate policies?
(Not only for RAC but databases in general).

Thanks.

Yasuhisa_Ishika
Level 6
Partner Accredited Certified

No advantage with standalone DB.

The reason you need to create separate policy is related to NetBackup's policy behavior. To accept backup request in Application Backup schedule from each RAC node, you need to add clients to poicy which has Application Backup. But if the same policy has Automatic Backup, backup script will be kicked on all of these nodes. In general, RMAN backup must be initiated on only one of RAC nodes.

If you put some trick into your backup script(suggested in Guide), simultaneous RMAN execution can be avoided even if you choose single policy configuration - I prefer this way. Otherwise, you need to create separate policies - one with Automatic Backup schedule have only one of VIP hostname as client, and another with Application Backup schedule have all of VIP hostname as client.

santave
Level 4

1. if vipnames point to prod IPs and hostnames have backup IPs
How to backup OracleDB via backup IPs? is it possible?
 

2. As I undestand, I have to create 2 policies. 1 for OracleBD data backup and 1 for ora archive only
Will this not produce problem in restoration?

RadovanTuran
Level 4

Good point.

In my previous job we had a lot of RACs but we used external scheduler. Therefore backup was started just for virtual cluster name even all nodes was included in policy.

But when NBU scheduler is used to create 2 policies seems to be the only reasonable way.

Thanks.

Yasuhisa_Ishika
Level 6
Partner Accredited Certified

1. if vipnames point to prod IPs and hostnames have backup IPs
How to backup OracleDB via backup IPs? is it possible?

I have never tried, but *maybe* it is possible by following channel allocation.
(I'm not sure if this works)

*** Sample 1: using failover vip in backup LAN ***
ALLOCATE CHANNEL t1 TYPE 'SBT_TAPE'  PARMS='ENV=(NB_ORA_CLIENT=bkvip1)' CONNECT='SYS/password@vip1';

ALLOCATE CHANNEL t2 TYPE 'SBT_TAPE'  PARMS='ENV=(NB_ORA_CLIENT=bkvip2)' CONNECT='SYS/password@vip2';
ALLOCATE CHANNEL t3 TYPE 'SBT_TAPE'  PARMS='ENV=(NB_ORA_CLIENT=bkvip3)' CONNECT='SYS/password@vip3';
SEND 'NB_ORA_SID=myracdc,NB_ORA_SERV=mymaster';
BACKUP DATABASE;

RELEASE CHANNEL t1;
RELEASE CHANNEL t2;
RELEASE CHANNEL t3;

*** Sample 2:  no backup VIP ***
ALLOCATE CHANNEL t1 TYPE 'SBT_TAPE'  CONNECT='SYS/password@vip1';
ALLOCATE CHANNEL t2 TYPE 'SBT_TAPE'  CONNECT='SYS/password@vip2';
ALLOCATE CHANNEL t3 TYPE 'SBT_TAPE'  CONNECT='SYS/password@vip3';
SEND 'NB_ORA_SID=myracdc,NB_ORA_SERV=mymaster';
BACKUP DATABASE;
RELEASE CHANNEL t1;
RELEASE CHANNEL t2;
RELEASE CHANNEL t3;

2. As I undestand, I have to create 2 policies. 1 for OracleBD data backup and 1 for ora archive only
Will this not produce problem in restoration?
What object to be backed up is defined in backup script, and backup script is tied to backup policy. So, If you need DB backup and archive backup separately, you need at least 2 policies(or more depending on your policy planning strategy).
No restoration problem produced by policy planning strategy as far as you thoroughly cover all files(DBs,archive logs,control files and so) in your backup scripts.

santave
Level 4

Hi,

Sorry for the late response.

1. I tested backup and got below error:
RMAN-03002: failure of allocate command at 12/01/2013 09:11:38
RMAN-06403: could not obtain a fully authorized session
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory

2. Who will maintan backup retention, should I define in rman script or It will follow retention setting in nbu gui?

Please help.

Thanks

santave
Level 4

below is the dbclient log.

 

15:32:44.451 [32796] <16> connect_to_service: connect failed STATUS (18) CONNECT_FAILED
        status: FAILED, (24) BAD_VERSION; system: (104) Connection reset by peer; FROM 0.0.0.0 TO osdbkpbsdpapp2 10.53.99.100 bprd VIA pbx
        status: FAILED, (9) READ_FAILED; system: (2) No such file or directory; FROM 0.0.0.0 TO osdbkpbsdpapp2 10.53.99.100 bprd VIA vnetd
        status: FAILED, (42) CONNECT_REFUSED; system: (111) Connection refused; FROM 0.0.0.0 TO osdbkpbsdpapp2 10.53.99.100 bprd
15:32:44.451 [32796] <8> vnet_connect_to_service: [vnet_connect.c:215] connect_to_service() failed 18 0x12
15:32:44.451 [32796] <2> bprd_connect: vnet_connect_to_service(osdbkpbsdpapp2) failed: 18
15:32:44.451 [32796] <2> bprd_get_features: bprd_connect(osdbkpbsdpapp2) failed, cannot connect on socket (25)
15:32:44.451 [32796] <16> bsa_checkFeatureId: unable to check if feature <36> is licensed
15:32:44.451 [32796] <16> bsa_checkFeatureId: Server exit status = 25: cannot connect on socket
15:32:44.451 [32796] <16> xbsa_ValidateFeatureId: ERR - VxBSAValidateFeatureId: Failed with error:
   Server Status:  cannot connect on socket
15:32:45.987 [32796] <4> sbtend: INF - --- END of SESSION ---
15:32:45.987 [32796] <4> VxBSATerminate: INF - entering VxBSATerminate.

Marianne
Level 6
Partner    VIP    Accredited Certified

Not sure how post is resolved when the backup failed?

As per dbclient log, this node cannot connect to bprd on the master via pbx (port 1556).

Ensure port connectivity between all cluster nodes and master on port 1556 in both directions.
This is needed in addition to connectivity between cluster nodes and media server.

Also verify forward and reverse name lookup between master and cluster nodes as well virtual hostnames (in addition to media server <-> cluster names lookup).