In 11gR2 Grid Infrastructure and RAC
UPDATE : 13-Sep-14 : How to run the RMAN Backup using server sessions concurrently on each node. Please scroll down to the update.
In a RAC environment, the database backups can be executed from any one node or distributed across multiple nodes of the cluster.
In my two-node environment, I have backups configured to go to an FRA. This is defined by the instance parameter "db_recovery_file_dest" (and "db_recovery_file_dest_size"). This can be a shared location -- e.g. an ASM DiskGroup or a ClusterFileSystem. Therefore, the parameter should ideally be the same across all nodes so that backups may be executed from any or multiple nodes without changing the backup location.
Running the RMAN commands from node1 :
Note how the "PLUS ARCHIVELOG" specification also included archivelogs from both threads (instances) of the database.
Let's verify these details from the instance on node2 :
Yes, today's backup is visible from node2 as it retrieves the information from the controlfile that is common across all the instances of the database.
How are the archivelogs configured ?
Both instances have the same destination configured for archivelogs and backups.
.
.
.
=======================================================
UPDATE : 13-Sep-14 : Running the backup concurrently from both nodes
There are two ways to have the RMAN Backup run from both nodes.
A. Issue a seperate RMAN BACKUP DATAFILE or BACKUP TABLESPACE command from each node, such that the two nodes have an independent list of Datafiles / Tablespaces
B. Issue a BACKUP DATABASE command from one node but with two channels open, one against each node.
Here, method A is easy to do but difficult to control as you add Tablespaces and Datafiles. So, I will demonstrate method B.
I begin with ensuring that
a. I have REMOTE_LOGIN_PASSWORDFILE configured so that I can make a SQLNet connection from node1 to node2 (RMAN requires the connect AS SYSDBA in 11g)
b. I have a TNSNAMES.ORA entry configured to the instance on node2 (note that the service name is common across all [both] instances in the Cluster)
Next, I start RMAN and allocate two Channels, one for each Instance (on each Node in the Cluster) and issue a BACKUP DATABASE that is automatically executed across both Channels.
We can see that Channel ch1 was connected to Instance RACDB_1 and ch2 was connected to RACDB_2. Also, the messages indicate that both channels were running concurrently.
I also verified that the Channels did connect to each instance :
As soon as I closed the RMAN (client) session, the two server processes also terminated.
This method (Method B) allows me to run an RMAN client session from any node in the Cluster and have RMAN server sessions running concurrently across all or some nodes of the Cluster, if I have not designated a single, specific node, as my RMAN Backups node.
Edit : I have demonstrated using ALLOCATE CHANNEL to run an adhoc, interactive, backup. If you want to create a persistent script, you might want to use CONFIGURE CHANNEL and have the SYS password persisted in the configuration (saved in the controlfile) so that it is not in "plain text" in a script.
.
.
.
UPDATE : 13-Sep-14 : How to run the RMAN Backup using server sessions concurrently on each node. Please scroll down to the update.
In a RAC environment, the database backups can be executed from any one node or distributed across multiple nodes of the cluster.
In my two-node environment, I have backups configured to go to an FRA. This is defined by the instance parameter "db_recovery_file_dest" (and "db_recovery_file_dest_size"). This can be a shared location -- e.g. an ASM DiskGroup or a ClusterFileSystem. Therefore, the parameter should ideally be the same across all nodes so that backups may be executed from any or multiple nodes without changing the backup location.
Running the RMAN commands from node1 :
[root@node1 ~]# su - oracle -sh-3.2$ sqlplus '/ as sysdba' SQL*Plus: Release 11.2.0.2.0 Production on Sun Sep 7 21:56:46 2014 Copyright (c) 1982, 2010, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> show parameter db_recovery_file NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest string +FRA db_recovery_file_dest_size big integer 4000M SQL> SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options -sh-3.2$ rman target / Recovery Manager: Release 11.2.0.2.0 - Production on Sun Sep 7 21:57:49 2014 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. connected to target database: RACDB (DBID=762767011) RMAN> list backup summary; using target database control file instead of recovery catalog List of Backups =============== Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag ------- -- -- - ----------- --------------- ------- ------- ---------- --- 12 B F A DISK 26-NOV-11 1 1 YES TAG20111126T224849 13 B A A DISK 26-NOV-11 1 1 YES TAG20111126T230108 16 B A A DISK 16-JUN-14 1 1 YES TAG20140616T222340 18 B A A DISK 16-JUN-14 1 1 YES TAG20140616T222738 19 B F A DISK 16-JUN-14 1 1 NO TAG20140616T222742 20 B F A DISK 05-JUL-14 1 1 NO TAG20140705T173046 21 B F A DISK 16-AUG-14 1 1 NO TAG20140816T231412 22 B F A DISK 17-AUG-14 1 1 NO TAG20140817T002340 RMAN> RMAN> backup as compressed backupset database plus archivelog delete input; Starting backup at 07-SEP-14 current log archived using channel ORA_DISK_1 channel ORA_DISK_1: starting compressed archived log backup set channel ORA_DISK_1: specifying archived log(s) in backup set input archived log thread=1 sequence=111 RECID=77 STAMP=857685630 input archived log thread=2 sequence=37 RECID=76 STAMP=857685626 input archived log thread=2 sequence=38 RECID=79 STAMP=857685684 input archived log thread=1 sequence=112 RECID=78 STAMP=857685681 channel ORA_DISK_1: starting piece 1 at 07-SEP-14 channel ORA_DISK_1: finished piece 1 at 07-SEP-14 piece handle=+FRA/racdb/backupset/2014_09_07/annnf0_tag20140907t220131_0.288.857685699 tag=TAG20140907T220131 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:09 channel ORA_DISK_1: deleting archived log(s) archived log file name=+FRA/racdb/archivelog/2014_09_07/thread_1_seq_111.307.857685623 RECID=77 STAMP=857685630 archived log file name=+FRA/racdb/archivelog/2014_09_07/thread_2_seq_37.309.857685623 RECID=76 STAMP=857685626 archived log file name=+FRA/racdb/archivelog/2014_09_07/thread_2_seq_38.277.857685685 RECID=79 STAMP=857685684 archived log file name=+FRA/racdb/archivelog/2014_09_07/thread_1_seq_112.270.857685681 RECID=78 STAMP=857685681 Finished backup at 07-SEP-14 Starting backup at 07-SEP-14 using channel ORA_DISK_1 channel ORA_DISK_1: starting compressed full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set input datafile file number=00001 name=+DATA1/racdb/datafile/system.257.765499365 input datafile file number=00002 name=+DATA2/racdb/datafile/sysaux.256.765502307 input datafile file number=00003 name=+DATA1/racdb/datafile/undotbs1.259.765500033 input datafile file number=00004 name=+DATA2/racdb/datafile/undotbs2.257.765503281 input datafile file number=00006 name=+DATA1/racdb/datafile/partition_test.265.809628399 input datafile file number=00007 name=+DATA1/racdb/datafile/hemant_tbs.266.852139375 input datafile file number=00008 name=+DATA3/racdb/datafile/new_tbs.256.855792859 input datafile file number=00005 name=+DATA1/racdb/datafile/users.261.765500215 channel ORA_DISK_1: starting piece 1 at 07-SEP-14 channel ORA_DISK_1: finished piece 1 at 07-SEP-14 piece handle=+FRA/racdb/backupset/2014_09_07/nnndf0_tag20140907t220145_0.270.857685709 tag=TAG20140907T220145 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:06:15 Finished backup at 07-SEP-14 Starting backup at 07-SEP-14 current log archived using channel ORA_DISK_1 channel ORA_DISK_1: starting compressed archived log backup set channel ORA_DISK_1: specifying archived log(s) in backup set input archived log thread=1 sequence=113 RECID=81 STAMP=857686085 input archived log thread=2 sequence=39 RECID=80 STAMP=857686083 channel ORA_DISK_1: starting piece 1 at 07-SEP-14 channel ORA_DISK_1: finished piece 1 at 07-SEP-14 piece handle=+FRA/racdb/backupset/2014_09_07/annnf0_tag20140907t220807_0.307.857686087 tag=TAG20140907T220807 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 channel ORA_DISK_1: deleting archived log(s) archived log file name=+FRA/racdb/archivelog/2014_09_07/thread_1_seq_113.309.857686085 RECID=81 STAMP=857686085 archived log file name=+FRA/racdb/archivelog/2014_09_07/thread_2_seq_39.277.857686083 RECID=80 STAMP=857686083 Finished backup at 07-SEP-14 Starting Control File and SPFILE Autobackup at 07-SEP-14 piece handle=+FRA/racdb/autobackup/2014_09_07/s_857686089.277.857686097 comment=NONE Finished Control File and SPFILE Autobackup at 07-SEP-14 RMAN>
Note how the "PLUS ARCHIVELOG" specification also included archivelogs from both threads (instances) of the database.
Let's verify these details from the instance on node2 :
[root@node2 ~]# su - oracle -sh-3.2$ rman target / Recovery Manager: Release 11.2.0.2.0 - Production on Sun Sep 7 22:11:00 2014 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. connected to target database: RACDB (DBID=762767011) RMAN> RMAN> list backup of database completed after 'trunc(sysdate)-1'; using target database control file instead of recovery catalog List of Backup Sets =================== BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 24 Full 258.21M DISK 00:06:12 07-SEP-14 BP Key: 24 Status: AVAILABLE Compressed: YES Tag: TAG20140907T220145 Piece Name: +FRA/racdb/backupset/2014_09_07/nnndf0_tag20140907t220145_0.270.857685709 List of Datafiles in backup set 24 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 1 Full 1160228 07-SEP-14 +DATA1/racdb/datafile/system.257.765499365 2 Full 1160228 07-SEP-14 +DATA2/racdb/datafile/sysaux.256.765502307 3 Full 1160228 07-SEP-14 +DATA1/racdb/datafile/undotbs1.259.765500033 4 Full 1160228 07-SEP-14 +DATA2/racdb/datafile/undotbs2.257.765503281 5 Full 1160228 07-SEP-14 +DATA1/racdb/datafile/users.261.765500215 6 Full 1160228 07-SEP-14 +DATA1/racdb/datafile/partition_test.265.809628399 7 Full 1160228 07-SEP-14 +DATA1/racdb/datafile/hemant_tbs.266.852139375 8 Full 1160228 07-SEP-14 +DATA3/racdb/datafile/new_tbs.256.855792859 RMAN>
Yes, today's backup is visible from node2 as it retrieves the information from the controlfile that is common across all the instances of the database.
How are the archivelogs configured ?
RMAN> exit Recovery Manager complete. -sh-3.2$ -sh-3.2$ sqlplus '/ as sysdba' SQL*Plus: Release 11.2.0.2.0 Production on Sun Sep 7 22:15:51 2014 Copyright (c) 1982, 2010, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> archive log list; Database log mode Archive Mode Automatic archival Enabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 39 Next log sequence to archive 40 Current log sequence 40 SQL> SQL> show parameter db_recovery_file_dest NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest string +FRA db_recovery_file_dest_size big integer 4000M SQL>
Both instances have the same destination configured for archivelogs and backups.
.
.
.
=======================================================
UPDATE : 13-Sep-14 : Running the backup concurrently from both nodes
There are two ways to have the RMAN Backup run from both nodes.
A. Issue a seperate RMAN BACKUP DATAFILE or BACKUP TABLESPACE command from each node, such that the two nodes have an independent list of Datafiles / Tablespaces
B. Issue a BACKUP DATABASE command from one node but with two channels open, one against each node.
Here, method A is easy to do but difficult to control as you add Tablespaces and Datafiles. So, I will demonstrate method B.
I begin with ensuring that
a. I have REMOTE_LOGIN_PASSWORDFILE configured so that I can make a SQLNet connection from node1 to node2 (RMAN requires the connect AS SYSDBA in 11g)
b. I have a TNSNAMES.ORA entry configured to the instance on node2 (note that the service name is common across all [both] instances in the Cluster)
-sh-3.2$ hostname node1.mydomain.com -sh-3.2$ id uid=800(oracle) gid=1001(oinstall) groups=1001(oinstall),1011(asmdba),1021(dba) -sh-3.2$ sqlplus '/ as sysdba' SQL*Plus: Release 11.2.0.2.0 Production on Sat Sep 13 23:22:09 2014 Copyright (c) 1982, 2010, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> show parameter remote_login_passwordfile; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ remote_login_passwordfile string EXCLUSIVE SQL> quit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options -sh-3.2$ cat $ORACLE_HOME/network/admin/tnsnames.ora # tnsnames.ora.node1 Network Configuration File: /u01/app/oracle/rdbms/11.2.0/network/admin/tnsnames.ora.node1 # Generated by Oracle configuration tools. RACDB_1 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = node1)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = RACDB) ) ) RACDB_2 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = node2)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = RACDB) ) ) -sh-3.2$
Next, I start RMAN and allocate two Channels, one for each Instance (on each Node in the Cluster) and issue a BACKUP DATABASE that is automatically executed across both Channels.
-sh-3.2$ rman target / Recovery Manager: Release 11.2.0.2.0 - Production on Sat Sep 13 23:23:24 2014 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. connected to target database: RACDB (DBID=762767011) RMAN> run 2> {allocate channel ch1 device type disk connect 'sys/manager@RACDB_1'; 3> allocate channel ch2 device type disk connect 'sys/manager@RACDB_2'; 4> backup as compressed backupset database plus archivelog delete input; 5> } using target database control file instead of recovery catalog allocated channel: ch1 channel ch1: SID=61 instance=RACDB_1 device type=DISK allocated channel: ch2 channel ch2: SID=61 instance=RACDB_2 device type=DISK Starting backup at 13-SEP-14 current log archived channel ch1: starting compressed archived log backup set channel ch1: specifying archived log(s) in backup set input archived log thread=2 sequence=40 RECID=82 STAMP=857687640 input archived log thread=1 sequence=114 RECID=84 STAMP=858204801 input archived log thread=2 sequence=41 RECID=83 STAMP=857687641 input archived log thread=1 sequence=115 RECID=86 STAMP=858208025 channel ch1: starting piece 1 at 13-SEP-14 channel ch2: starting compressed archived log backup set channel ch2: specifying archived log(s) in backup set input archived log thread=2 sequence=42 RECID=85 STAMP=858208000 input archived log thread=1 sequence=116 RECID=87 STAMP=858209078 input archived log thread=2 sequence=43 RECID=88 STAMP=858209079 channel ch2: starting piece 1 at 13-SEP-14 channel ch2: finished piece 1 at 13-SEP-14 piece handle=+FRA/racdb/backupset/2014_09_13/annnf0_tag20140913t232445_0.279.858209109 tag=TAG20140913T232445 comment=NONE channel ch2: backup set complete, elapsed time: 00:00:26 channel ch2: deleting archived log(s) archived log file name=+FRA/racdb/archivelog/2014_09_13/thread_2_seq_42.296.858207997 RECID=85 STAMP=858208000 archived log file name=+FRA/racdb/archivelog/2014_09_13/thread_1_seq_116.263.858209079 RECID=87 STAMP=858209078 archived log file name=+FRA/racdb/archivelog/2014_09_13/thread_2_seq_43.265.858209079 RECID=88 STAMP=858209079 channel ch1: finished piece 1 at 13-SEP-14 piece handle=+FRA/racdb/backupset/2014_09_13/annnf0_tag20140913t232445_0.275.858209099 tag=TAG20140913T232445 comment=NONE channel ch1: backup set complete, elapsed time: 00:00:56 channel ch1: deleting archived log(s) archived log file name=+FRA/racdb/archivelog/2014_09_07/thread_2_seq_40.309.857687641 RECID=82 STAMP=857687640 archived log file name=+FRA/racdb/archivelog/2014_09_13/thread_1_seq_114.295.858204777 RECID=84 STAMP=858204801 archived log file name=+FRA/racdb/archivelog/2014_09_07/thread_2_seq_41.293.857687641 RECID=83 STAMP=857687641 archived log file name=+FRA/racdb/archivelog/2014_09_13/thread_1_seq_115.305.858208001 RECID=86 STAMP=858208025 Finished backup at 13-SEP-14 Starting backup at 13-SEP-14 channel ch1: starting compressed full datafile backup set channel ch1: specifying datafile(s) in backup set input datafile file number=00001 name=+DATA1/racdb/datafile/system.257.765499365 input datafile file number=00004 name=+DATA2/racdb/datafile/undotbs2.257.765503281 input datafile file number=00007 name=+DATA1/racdb/datafile/hemant_tbs.266.852139375 input datafile file number=00008 name=+DATA3/racdb/datafile/new_tbs.256.855792859 channel ch1: starting piece 1 at 13-SEP-14 channel ch2: starting compressed full datafile backup set channel ch2: specifying datafile(s) in backup set input datafile file number=00002 name=+DATA2/racdb/datafile/sysaux.256.765502307 input datafile file number=00003 name=+DATA1/racdb/datafile/undotbs1.259.765500033 input datafile file number=00006 name=+DATA1/racdb/datafile/partition_test.265.809628399 input datafile file number=00005 name=+DATA1/racdb/datafile/users.261.765500215 channel ch2: starting piece 1 at 13-SEP-14 channel ch2: finished piece 1 at 13-SEP-14 piece handle=+FRA/racdb/backupset/2014_09_13/nnndf0_tag20140913t232557_0.293.858209175 tag=TAG20140913T232557 comment=NONE channel ch2: backup set complete, elapsed time: 00:12:02 channel ch1: finished piece 1 at 13-SEP-14 piece handle=+FRA/racdb/backupset/2014_09_13/nnndf0_tag20140913t232557_0.305.858209163 tag=TAG20140913T232557 comment=NONE channel ch1: backup set complete, elapsed time: 00:13:06 Finished backup at 13-SEP-14 Starting backup at 13-SEP-14 current log archived channel ch1: starting compressed archived log backup set channel ch1: specifying archived log(s) in backup set input archived log thread=1 sequence=117 RECID=90 STAMP=858209954 channel ch1: starting piece 1 at 13-SEP-14 channel ch2: starting compressed archived log backup set channel ch2: specifying archived log(s) in backup set input archived log thread=2 sequence=44 RECID=89 STAMP=858209952 channel ch2: starting piece 1 at 13-SEP-14 channel ch1: finished piece 1 at 13-SEP-14 piece handle=+FRA/racdb/backupset/2014_09_13/annnf0_tag20140913t233915_0.265.858209957 tag=TAG20140913T233915 comment=NONE channel ch1: backup set complete, elapsed time: 00:00:03 channel ch1: deleting archived log(s) archived log file name=+FRA/racdb/archivelog/2014_09_13/thread_1_seq_117.309.858209953 RECID=90 STAMP=858209954 channel ch2: finished piece 1 at 13-SEP-14 piece handle=+FRA/racdb/backupset/2014_09_13/annnf0_tag20140913t233915_0.263.858209957 tag=TAG20140913T233915 comment=NONE channel ch2: backup set complete, elapsed time: 00:00:03 channel ch2: deleting archived log(s) archived log file name=+FRA/racdb/archivelog/2014_09_13/thread_2_seq_44.295.858209951 RECID=89 STAMP=858209952 Finished backup at 13-SEP-14 Starting Control File and SPFILE Autobackup at 13-SEP-14 piece handle=+FRA/racdb/autobackup/2014_09_13/s_858209961.295.858209967 comment=NONE Finished Control File and SPFILE Autobackup at 13-SEP-14 released channel: ch1 released channel: ch2 RMAN>
We can see that Channel ch1 was connected to Instance RACDB_1 and ch2 was connected to RACDB_2. Also, the messages indicate that both channels were running concurrently.
I also verified that the Channels did connect to each instance :
[root@node1 ~]# ps -ef |grep RACDB_1 |grep LOCAL=NO oracle 11205 1 1 23:24 ? 00:00:00 oracleRACDB_1 (LOCAL=NO) You have new mail in /var/spool/mail/root [root@node1 ~]# ps -ef |grep RACDB_1 |grep LOCAL=NO oracle 11205 1 3 23:24 ? 00:00:04 oracleRACDB_1 (LOCAL=NO) [root@node1 ~]# ps -ef |grep RACDB_1 |grep LOCAL=NO oracle 11205 1 4 23:24 ? 00:00:49 oracleRACDB_1 (LOCAL=NO) [root@node1 ~]# [root@node2 ~]# ps -ef |grep RACDB_2 | grep LOCAL=NO oracle 6233 1 0 23:24 ? 00:00:00 oracleRACDB_2 (LOCAL=NO) You have new mail in /var/spool/mail/root [root@node2 ~]# ps -ef |grep RACDB_2 |grep LOCAL=NO oracle 6233 1 0 23:24 ? 00:00:00 oracleRACDB_2 (LOCAL=NO) [root@node2 ~]# ps -ef |grep RACDB_2 |grep LOCAL=NO oracle 6233 1 2 23:24 ? 00:00:24 oracleRACDB_2 (LOCAL=NO) [root@node2 ~]#
As soon as I closed the RMAN (client) session, the two server processes also terminated.
This method (Method B) allows me to run an RMAN client session from any node in the Cluster and have RMAN server sessions running concurrently across all or some nodes of the Cluster, if I have not designated a single, specific node, as my RMAN Backups node.
Edit : I have demonstrated using ALLOCATE CHANNEL to run an adhoc, interactive, backup. If you want to create a persistent script, you might want to use CONFIGURE CHANNEL and have the SYS password persisted in the configuration (saved in the controlfile) so that it is not in "plain text" in a script.
.
.
.
14 comments:
Thanks Sir,that's is helpful. Also How often do you suggest to use multiple nodes to used in allocating for rman backup .
Jay,
Yes I intend to post using multiple nodes for Backups.
Hemant
Jay,
See my update of 13-Sep. I demonstrate issuing an RMAN command from one node that uses RMAN server sessions on multiple nodes to backup the database concurrently.
If you do not have a dedicated node for backups you could consider such a strategy.
Hemant
Thanks Hemant.
Lets say you backup RAC db backup to FRA. Would you not need another job which copies from FRA to a filesystem so that it can be backed up by sysadmin?
Tia
Kishore
Anonymous,
If you want to be able to copy those backupsets to other storage or tape drives, you do have options
(1) Create the FRA on a Cluster File System -- either from the hardware /OS vendor or ACFS (starting with 11.2.0.3)
(2) Use the RMAN command BACKUP RECOVERY AREA TO DESTINATION to backup to a disk area
(3) Integrate RMAN with the media management libraries and use BACKUP RECOVERY AREA
Thank you for your information. I have a question. Have you tried to run a backup script with "allocation"s to more than one(1) node and found that the second node was down? We have run the backup from a script, only to find the backup failed because the second node was down. The can be a problem since we have the job scheduled to run for cron. Also, we only have a window once a week to backup our 20+TB database, so we need it to run even with only one node.
We try to use multiple nodes to speed up the backup process.
Can we tell RMAN if one node is missing to continue on the remaining nodes?
Thanks
Lyle
Lyle,
You could write a wrapper script that checks if all the instances are up (or identifies which instances are up). Depending on the available instances, it can then create or submit a pre-defined RMAN script. (For example, you could for a 2 node cluster, you could have three different RMAN scripts, one for each instance and one for both instances and the wrapper could call the appropriate script depending on which instance or both instances are up).
The wrapper could be a simple SELECT SYSDATE FROM DUAL to see if it could connect to the instance and return a row. I'd done this in a shell script that calls SQL, spools the output of the SQL and then checks the contents of the output file to determine if the instance is up or not.
Hemant
Thanks for your follow-up. I found another way to do the backups that will load balance over the available nodes.
First create a service. I used 'srv_4_rman'.
Then in the backup you will still need to have the netbackup policy (NB_ORA_CLASS) and the netbackup server (NB_ORA_SRV). But the backup will assign the netbackup Client when it allocates the node.
In the example below there are only three nodes total in the RAC and one of the nodes is down. So the backup will load balance over the remaining two nodes with the 6 allocated channels.
Here is the backup command:
run{
allocate channel t1 type 'SBT_TAPE' connect 'sys/????@srv_4_rman';
allocate channel t2 type 'SBT_TAPE' connect 'sys/????srv_4_rman';
allocate channel t3 type 'SBT_TAPE' connect 'sys/????@srv_4_rman';
allocate channel t4 type 'SBT_TAPE' connect 'sys/????@srv_4_rman';
allocate channel t5 type 'SBT_TAPE' connect 'sys/????@srv_4_rman';
allocate channel t6 type 'SBT_TAPE' connect 'sys/????@srv_4_rman';
SEND 'NB_ORA_CLASS=oemdb_asmarch_rman, NB_ORA_SERV=nbumaster.bk';
# backup all archive logs
backup
filesperset 64
format 'al_%s_%p_%t'
archivelog like '+FRA/%thread%' delete input;
}
Lyle,
Good idea.
However,
a) if an instance goes down when a channel is connected to itm that channel fails
b) this method doesn't guarantee load balancing across the available nodes. You might end up with 4 channels on one node and 2 channels on the other node.
One question. Did you see a great difference about the time, between run the backup in one node and run it in 2 nodes? Obviously run the backup through 2 nodes was faster?
Thanks.
Carlos,
My "dummy" database was too small to validate such a backup-speed test. If you backup to a tape drive assembly, you need multiple tapes streaming in parallel. If the backup runs over a network link, the link should have enough bandwidth to handle the parallel channels.
Hi, an overall question.
In rac , which kind of backup is recommended?
Is it to take from one node or all node?
What's advantage and disadvantage on doing both kind ?
Thanks
S.H.E.M.E.E.M
I'd recommend RMAN Backups using multiple nodes if the database is large with the proviso that you have multiple tape drives to write to concurrently. As for advantages/disadvantages, you could see the previous discussions above in the comments.
Hi Hemanth,
I want to initiate the backup of RAC database which should run from both the nodes, without using below option
run
{
allocate channel t1 type DISK connect 'sys/????@srv_4_rman';
allocate channel t2 type DISK connect 'sys/????srv_4_rman';
backup database plus archivelog;
}
Recently i came across this Question
Post a Comment