In this configuration, the NetBackup master server can always use the failover vipnameto reach an active host to run the backup script. However, because RMAN allocates the channels on both hosts, the NetBackup media server must connect back to the correct host to obtain the data for each request. Hence, the backup images are stored under two different client names which also differ from the failovervipnamethat is used to execute the script.
■ Set up the policy to specify the failovervipnameas the client name. Thus, the Automatic schedule executes the backup script on a host that is currently operational.
■ The backup script or an identical copy must be accessible to all hosts in the cluster. The clustered file system is a good location.
■ Do not configure the backup script to send a single value for NB_ORA_CLIENT.
The NetBackup media server must connect back to the correct host, which depends on which host originated the user-directed backup request. Select one of the following three methods to accomplish this task:
■ Configure the backup to provide a host specific client name with each backup request using one of the following three options:
■ Configure RMAN to bind specific channels to specific instances and send specific client names on each channel for backup image storage and for connect-back to the requesting host for the data transfer. Do not use the failover VIP name, because it is active on only one of the hosts.
ALLOCATE CHANNEL 1 ... PARMS='ENV=(NB_ORA_CLIENT=vipname1)' CONNECT='sys/passwd@vipname1';
ALLOCATE CHANNEL 2 ... PARMS='ENV=(NB_ORA_CLIENT=vipname2)' CONNECT='sys/passwd@vipname2';
ALLOCATE CHANNEL 3 ... PARMS='ENV=(NB_ORA_CLIENT=vipname1)' CONNECT='sys/passwd@vipname1';
ALLOCATE CHANNEL 4 ... PARMS='ENV=(NB_ORA_CLIENT=vipname2)' CONNECT='sys/passwd@vipname2';
Note:If one or more of these nodes are down, these allocation operations fail which causes the backup to fail.
■ Alternatively, configure Oracle to bind specific channels to specific hosts.
CONFIGURE CHANNEL 1 DEVICE TYPE 'SBT_TAPE' CONNECT 'sys/passwd@vipname1' PARMS
"ENV=(NB_ORA_CLIENT=vipname1)";
CONFIGURE CHANNEL 2 DEVICE TYPE 'SBT_TAPE' CONNECT 'sys/passwd@vipname2' PARMS
"ENV=(NB_ORA_CLIENT=vipname2)";
CONFIGURE CHANNEL 3 DEVICE TYPE 'SBT_TAPE' CONNECT 'sys/passwd@vipname1' PARMS
"ENV=(NB_ORA_CLIENT=vipname1)";
CONFIGURE CHANNEL 4 DEVICE TYPE 'SBT_TAPE' CONNECT 'sys/passwd@vipname2' PARMS
"ENV=(NB_ORA_CLIENT=vipname2)";
■ By default, the backup uses CLIENT_NAME from the bp.conf file which should be distinct for each host and is typically the physical hostname.
■ Because CLIENT_NAME or NB_ORA_CLIENT values must differ from the failovervipnamein the policy, the NetBackup master server cannot accept the user-directed backup request unless it implements one of the following options.
Option A: Modify the existing policy and the backup script to handle multiple client names.
■ Add bothvipnamesto the policy, in addition to the failovervipname.
■ Modify the script so that it exits with status 0 if the client name is not the failovervipname.
Option B: Alternatively, use a separate policy to accept the backup requests.
■ Create a second policy to receive the backup requests from RMAN.
■ Set the policy type to be Oracle.
■ Set the policy to contain the VIP, client, or host names as configured for NB_ORA_CLIENT or CLIENT_NAME in the previous step.
■ The Application Backup schedule must have an open window to accept the backups.
■ The policy does not need a backup script or an automatic schedule.
■ Instead of the policy with the automatic schedule, configure the backup script to provide the name of this policy with each user-directed backup request:
ALLOCATE CHANNEL...PARMS='ENV=(NB_ORA_POLICY=<second_policy_name>)';
or
SEND 'NB_ORA_POLICY=<second_policy_name>';
■ The NetBackup master server configuration must allow the physical host names access to the backup images that are stored under the failovervipnames as follows:
cd /usr/openv/netbackup/db/altnames echo "failover_vipname" >> hostname1 echo "hostname1" >> hostname1 echo "vipname1" >> hostname1 echo "hostname2" >> hostname1 echo "vipname2" >> hostname1 cp hostname1 hostname2
■ If the client hosts use REQUIRED_INTERFACE or another means to force NetBackup to use the IP addresses associated with thevipnamesfor the outbound user-directed backup requests, then also allow thevipnamesto access all of the backup images.
cd /usr/openv/netbackup/db/altnames cp hostname1 vipname1
cp hostname1 vipname2
Option A: The NetBackup scheduler starts three automatic jobs, and each runs the backup script (two of them on the same host). The two executions of the backup script that receive thevipnamesexit immediately with status 0 to avoid a redundant backup and any retries. The third execution of the backup script that receives the failover_vipname, starts RMAN. RMAN then sends the data for backup by using the appropriate client name for the instance-host. NetBackup stores the backup images under the initiating policy by using both client names.
Option B: The first policy runs the backup script by using the failovervipname. RMAN sends the name of the second policy and the configured client names for each channel with the user-directed request from each host. The second policy stores the backup images by using both client names.
Either client can initiate a restore. RMAN must be configured with 'SET AUTOLOCATE ON;' to request the backupset pieces from the appropriate instance-host that performed the backup. Alternatively, you can restore from either host-instance if you configure each restore request to include the correct client name used at the time the backupset piece was transferred to storage.
SEND 'NB_ORA_CLIENT=client_name_used_by_backup'