cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure policy to backup ORACLE RAC? It look like duplicate.

Apitha
Level 4
Partner Accredited Certified

I had configue policy to backup like pictures that I attached.

---------------------------------------------------------------------------------------------------
backup script on node 1 as:

ORACLE_HOME=/oracle/product/10.2
export ORACLE_HOME

ORACLE_SID=bwdb1
export ORACLE_SID

ORACLE_USER=oracle

TARGET_CONNECT_STR=sys/oracle
---------------------------------------------------------------------------------------------------





---------------------------------------------------------------------------------------------------
backup script on node 1 as:

ORACLE_HOME=/oracle/product/10.2
export ORACLE_HOME

ORACLE_SID=bwdb2
export ORACLE_SID

ORACLE_USER=oracle

TARGET_CONNECT_STR=sys/oracle
---------------------------------------------------------------------------------------------------





and configure both RMAN backup script on 2 RAC nodes as:

RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb1-vip)' CONNECT='sys/oracle@bwdb1';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb2-vip)' CONNECT='sys/oracle@bwdb2';
SEND 'NB_ORA_SERV=adsrv-01,NB_ORA_POLICY=bwdb';
# BACKUP DATAFILES
BACKUP
    $BACKUP_TYPE
    SKIP INACCESSIBLE
    TAG hot_db_bk_level0
    FILESPERSET 5
    # recommended format
    FORMAT 'bk_%s_%p_%t'
    DATABASE;
    sql 'alter system archive log current';
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
# backup all archive logs
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb1-vip)' CONNECT='sys/oracle@bwdb1';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb2-vip)' CONNECT='sys/oracle@bwdb2';
SEND 'NB_ORA_SERV=adsrv-01,NB_ORA_POLICY=bwdb';
BACKUP
   filesperset 20
   FORMAT 'al_%s_%p_%t'
   ARCHIVELOG ALL;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb1-vip.mistine.co.th)' CONNECT='sys/oracle@bwdb1';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb2-vip.mistine.co.th)' CONNECT='sys/oracle@bwdb2';
SEND 'NB_ORA_SERV=adsrv-01,NB_ORA_POLICY=bwdb';
BACKUP
    # recommended format
    FORMAT 'cntrl_%s_%p_%t'
    CURRENT CONTROLFILE;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb1-vip)' CONNECT='sys/oracle@bwdb1';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb2-vip)' CONNECT='sys/oracle@bwdb2';
SEND 'NB_ORA_SERV=adsrv-01,NB_ORA_POLICY=bwdb';
BACKUP VALIDATE DATABASE;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
}

It look like duplicate backup data. How to solve this?
1 ACCEPTED SOLUTION

Accepted Solutions

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified
I had another look at your original post.
You have the same script name on node 1 and 2, right?
Script on node 1 backs up SID 1 and script on node 2 backs up SID 2, right?

So, then my original recommendation stands:
Remove one script entry from Backup Selection.

When there is more than one name in Client List, the same backup selection applies to all Client names.
The same applies to normal file systems backups - if you have /usr in Backup Selection and 4 names in Client tab, 4 jobs will be generated - one for each client, all backing up /usr.

View solution in original post

15 REPLIES 15

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

Delete the second backup selection. Having two entries will run the script twice.

Apitha
Level 4
Partner Accredited Certified
Use 1 rman script from any node in RAC?

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified
I think with your current configuration it will actually end up in 4 copies:
You have 2 names in Client tab
You have 2 scripts in the Backup Selection

This setup will run both scripts on both clients.

Apitha
Level 4
Partner Accredited Certified
use 1 client and 1 RMAN script?

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified
I had another look at your original post.
You have the same script name on node 1 and 2, right?
Script on node 1 backs up SID 1 and script on node 2 backs up SID 2, right?

So, then my original recommendation stands:
Remove one script entry from Backup Selection.

When there is more than one name in Client List, the same backup selection applies to all Client names.
The same applies to normal file systems backups - if you have /usr in Backup Selection and 4 names in Client tab, 4 jobs will be generated - one for each client, all backing up /usr.

Apitha
Level 4
Partner Accredited Certified

I had another look at your original post.
You have the same script name on node 1 and 2, right?
Script on node 1 backs up SID 1 and script on node 2 backs up SID 2, right?

>>> YES

If I remove one script entry from Backup Selection, it should backup as 1 copy?

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified
The way I see it, the following backup jobs will run:
node 1 will run backup job for SID 1 and node 2 will run backup job for SID 2.

Apitha
Level 4
Partner Accredited Certified
I try to configure for 1 script in backup selection but it look like duplicate and I found error.

---------------------------------------------------------------------------------------------------------------------------------------------------------------
on node1 (bwdb1):
bp.conf:

SERVER = adsrv-01
CLIENT_NAME = bwdb1-vip.mistine.co.th
REQUIRED_INTERFACE=bwdb1-vip.mistine.co.th

script backup as:

ORACLE_HOME=/oracle/product/10.2
export ORACLE_HOME
ORACLE_SID=bwdb1
export ORACLE_SID
ORACLE_USER=oracle
TARGET_CONNECT_STR=sys/oracle

RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb1-vip.mistine.co.th)' CONNECT='sys/oracle@bwdb1';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb2-vip.mistine.co.th)' CONNECT='sys/oracle@bwdb2';
SEND 'NB_ORA_SERV=adsrv-01,NB_ORA_POLICY=bwdb';
# BACKUP DATAFILES
BACKUP
    $BACKUP_TYPE
    SKIP INACCESSIBLE
    TAG hot_db_bk_level0
    FILESPERSET 5
    # recommended format
    FORMAT 'bk_%s_%p_%t'
    DATABASE;
    sql 'alter system archive log current';
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
# backup all archive logs
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb1-vip.mistine.co.th)' CONNECT='sys/oracle@bwdb1';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb2-vip.mistine.co.th)' CONNECT='sys/oracle@bwdb2';
SEND 'NB_ORA_SERV=adsrv-01,NB_ORA_POLICY=bwdb';
BACKUP
   filesperset 20
   FORMAT 'al_%s_%p_%t'
   ARCHIVELOG ALL;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb1-vip.mistine.co.th)' CONNECT='sys/oracle@bwdb1';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb2-vip.mistine.co.th)' CONNECT='sys/oracle@bwdb2';
SEND 'NB_ORA_SERV=adsrv-01,NB_ORA_POLICY=bwdb';
BACKUP
    # recommended format
    FORMAT 'cntrl_%s_%p_%t'
    CURRENT CONTROLFILE;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
}
EOF
---------------------------------------------------------------------------------------------------------------------------------------------------------------

in .out log:
released channel: ch00

released channel: ch01

RMAN> RMAN>

Recovery Manager complete.





------------------------------------------------------------------------------------------------------------------------------------------------------------------
on node 2 (bwdb2)
bp.conf

SERVER = adsrv-01
CLIENT_NAME = bwdb2-vip.mistine.co.th
REQUIRED_INTERFACE=bwdb2-vip.mistine.co.th

backup script:

ORACLE_HOME=/oracle/product/10.2
export ORACLE_HOME
ORACLE_SID=bwdb2
export ORACLE_SID
ORACLE_USER=oracle
TARGET_CONNECT_STR=sys/oracle

RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb1-vip.mistine.co.th)' CONNECT='sys/oracle@bwdb1';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb2-vip.mistine.co.th)' CONNECT='sys/oracle@bwdb2';
SEND 'NB_ORA_SERV=adsrv-01,NB_ORA_POLICY=bwdb';
# BACKUP DATAFILES
BACKUP
    $BACKUP_TYPE
    SKIP INACCESSIBLE
    TAG hot_db_bk_level0
    FILESPERSET 5
    # recommended format
    FORMAT 'bk_%s_%p_%t'
    DATABASE;
    sql 'alter system archive log current';
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
# backup all archive logs
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb1-vip.mistine.co.th)' CONNECT='sys/oracle@bwdb1';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb2-vip.mistine.co.th)' CONNECT='sys/oracle@bwdb2';
SEND 'NB_ORA_SERV=adsrv-01,NB_ORA_POLICY=bwdb';
BACKUP
   filesperset 20
   FORMAT 'al_%s_%p_%t'
   ARCHIVELOG ALL;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb1-vip.mistine.co.th)' CONNECT='sys/oracle@bwdb1';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb2-vip.mistine.co.th)' CONNECT='sys/oracle@bwdb2';
SEND 'NB_ORA_SERV=adsrv-01,NB_ORA_POLICY=bwdb';
BACKUP
    # recommended format
    FORMAT 'cntrl_%s_%p_%t'
    CURRENT CONTROLFILE;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
}
EOF
------------------------------------------------------------------------------------------------------------------------------------------------------------------

I found error from .out

allocated channel: ch00
channel ch00: sid=1030 instance=bwdb1 devtype=SBT_TAPE
channel ch00: Veritas NetBackup for Oracle - Release 7.0 (2010010501)

allocated channel: ch01
channel ch01: sid=1052 instance=bwdb2 devtype=SBT_TAPE
channel ch01: Veritas NetBackup for Oracle - Release 7.0 (2010010501)

sent command to channel: ch01
sent command to channel: ch00

released channel: ch00
released channel: ch01
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of crosscheck command on ch00 channel at 07/19/2553 01:50:39
ORA-27191: sbtinfo2 returned error
Additional information: 2



How can I solve this issue? Please advice me.

AAlmroth
Level 6
Partner Accredited

From what I'm reading, you are perhaps trying to backup the "sub" SIDs? Each active node in the RAC will have <sid><instance>, so in your case, bwdb is possibly the actual SID, and bwdb1 in running on node 1, and bwdb2 is running on node 2?

If that is not the case, and these are actually two separate databases, I think you should use another approach. When using the SID, the Oracle listener will re-direct the request to the next node in queue (like round-robin), as this distributes the query load.

Using the VIP address as required interface in NBU could potentially add backup/restore issues. I always use the physical node's IP address, and use two NBU policies; one for Default-Application-Backup schedule, and one "kick-off" policy. The first policy lists all possible phyiscal nodes in the RAC, and have a dummy backup selection (never used), as no backups will ever be started using this poilcy. The kick-off policy will use the VIP hostname, and the executing script as backup selection.

In your backup scripts it looks as if you use both VIP to allocate channels, why? I think this may add problems.
I suggest you only run the backup on one node, especially as you don't seem to use RMAN Catalog. This will only add to more work if you have to restore the complete database.

Change the allocate channel to somethins along the lines for bwdb1;
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS='ENV='NB_ORA_SERV=adsrv-01,NB_ORA_POLICY=bwdb' CONNECT='sys/oracle@bwdb1';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS='ENV='NB_ORA_SERV=adsrv-01,NB_ORA_POLICY=bwdb' CONNECT='sys/oracle@bwdb1';

and for bwdb2;
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS='ENV='NB_ORA_SERV=adsrv-01,NB_ORA_POLICY=bwdb' CONNECT='sys/oracle@bwdb2';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS='ENV='NB_ORA_SERV=adsrv-01,NB_ORA_POLICY=bwdb' CONNECT='sys/oracle@bwdb2';
 

/A

 

Apitha
Level 4
Partner Accredited Certified

so in your case, bwdb is possibly the actual SID, and bwdb1 in running on node 1, and bwdb2 is running on node 2?
>> Yes, I want to backup bwdb but I don't understand about ORACLE RAC.

I check from oracle's profile, ORACLE_SID on node1 = bwdb1 and ORACLE_SID on node2 = bwdb2.

It had both VIP on ORACLE RAC.

How I can backup this ORACLE RAC, on manual netbackup it say use both VIP:

ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb1-vip.mistine.co.th)' CONNECT='sys/oracle@bwdb1';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb2-vip.mistine.co.th)' CONNECT='sys/oracle@bwdb2';

I try to do.

but it look like duplicate data.

How can I do backup with ORACLE RAC, please recommend.

Apitha
Level 4
Partner Accredited Certified

Are you sure, if configure as your recommend:

ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS='ENV='NB_ORA_SERV=adsrv-01,NB_ORA_POLICY=bwdb' CONNECT='sys/oracle@bwdb1';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS='ENV='NB_ORA_SERV=adsrv-01,NB_ORA_POLICY=bwdb' CONNECT='sys/oracle@bwdb1';

use 1 client and 1 script on node 1, it enough to restore whole database, right?

AAlmroth
Level 6
Partner Accredited
OK, so we getting closer... BWDB is the database (public SID is BWDB) with two instances bwdb1/bwdb2. What you suggest is that the RAC is configured for load-balancing (as you have two VIP), and also would like to perform the backup using both nodes (possibly to cut the backup window).

So, what you do, is to use the approach I described above; one policy for the actual backup (Oracle servers connect back using the Default-Application-Backup schedule), and one kick-off policy. In the first policy, you add the two VIP hostnames, and use a dummy backup selection.
In the kick-off policy you only add one VIP hostname, and the script as backup selection.

In your RMAN script, you then use the allocate channel as you had originally;
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb1-vip.mistine.co.th,NB_ORA_POLICY=bwdb-RMAN)' CONNECT='sys/oracle@bwdb1';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=bwdb2-vip.mistine.co.th,NB_ORA_POLICY=bwdb-RMAN)' CONNECT='sys/oracle@bwdb2';

This way, NBU will connect to say bwdb1-vip.mistine.co.th, executing the script, and then RMAN will use both nodes. Now, the backup should not be duplicate, as the script only runs on bwdb1-vip.mistine.co.th. bwdb2-vip.mistine.co.th is only used for connecting back with the RMAN stream (no script running).

Notice NB_ORA_POLICY=bwdb-RMAN, this is the policy containing Default-Application-Backup schedule. the bwdb policy in NBU should be the kick-off script.

/A

Apitha
Level 4
Partner Accredited Certified

I try to backup on node 1 only. and it can backup successfully. I wonder when I try to restore, it can restore successful?

xiazhen
Level 4
If you are in a RAC environment and you chose one of the archive log schemes


described in the previous section, you can perform a backup and a restore using
typical RMAN scripts.
In the following example, RMAN backs up the database, including all of the
archive logs. This example assumes that the archive logs are accessible by each
node in the cluster. If they are not, then the archive logs need to be backed up
separately on each node

The NB_ORA_CLIENT environment variable is set to the virtual host name
of the cluster.



RUN
{
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND 'NB_ORA_CLIENT=$NB_ORA_CLIENT, NB_ORA_SERV=$NB_ORA_SERV';
BACKUP
DATABASE;
sql 'alter system archive log current';
RELEASE CHANNEL ch00;
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND 'NB_ORA_CLIENT=$NB_ORA_CLIENT, NB_ORA_SERV=$NB_ORA_SERV';
BACKUP
ARCHIVELOG ALL ;
RELEASE CHANNEL ch00;
}

Anton_Panyushki
Level 6
Certified
Hav a look at appendix B of http://seer.entsupport.symantec.com/docs/340131.htm.

They describe several approaches for Oracle RAC backup. It highly depends on RAC configuration.