Prepare Your Scripts
You must provide custom scripts to Oracle Cloud Infrastructure Full Stack Disaster Recovery Service for certain actions in the switchover and failover plans.
About Scripts for Replicating the Oracle WebLogic Server for OCI Configuration
Note:
This applies to Disaster Recover models based on “OCI File Storage with rsync” and “Database File System (DBFS)” methods for configuration replication.
This step does NOT apply to Disaster Recovery model based on Oracle Cloud Infrastructure Block Volumes cross-region replica.
If you're using configuration replication scripts to copy the Oracle WebLogic Domain to the standby site, then you can add them as a user step to the switchover plan.
If the Oracle WebLogic configuration in standby is already up-to-date with primary, then running them is not mandatory. If not, you can run the scripts right before the switchover to get the latest configuration from primary in the standby’s Oracle WebLogic domain.
For Oracle WebLogic Server for OCI and Oracle SOA Suite on Marketplace disaster recovery cases, you must run the scripts first in the Administration host 0 of the site that has the primary role, and then in the Administration host of the site that has the standby role.
For the scripts, see Oracle WebLogic Server for Oracle Cloud Infrastructure, Disaster Recovery Production and DR in the Oracle Cloud Infrastructure (OCI) and SOA Suite on Oracle Cloud Infrastructure Marketplace Disaster Recovery, Production and Disaster Recovery in the Oracle Cloud Infrastructure (OCI).
Locate the path of the script in the Administration hosts. For example,
/u01/scripts/config_replica.sh
.
About the Script to Update the Database Connect String
Note:
This task only applies to the Disaster Recovery model based on OCI Block Volumes cross-region replication. This task does NOT apply to Disaster Recovery models based on “OCI File Storage with rsync” and “Database File System (DBFS)” methods for configuration replication.
To automate this replacement, use the script
replacement_script_BVmodel.sh
. This script is provided in Oracle WebLogic Server for Oracle Cloud
Infrastructure, Disaster Recovery Production and DR in the Oracle Cloud
Infrastructure (OCI) and SOA Suite on Oracle Cloud Infrastructure
Marketplace Disaster Recovery, Production and Disaster Recovery in the Oracle
Cloud Infrastructure (OCI) for the Block Volume cross-region DR model.
You place this script in all of the WebLogic nodes, in primary and standby, in a
folder that is not in a Block Volume that is replicated. The script must be
customized with the appropriate values in each region.
Locate the path of the script in the hosts. For example,
/u01/scripts/replacement_script_BVmodel.sh
.
Create Scripts to Start and Stop Oracle WebLogic Processes
wls_stop.sh
and wls_start.sh
scripts provided in the Download Code
section. These scripts are valid for Oracle WebLogic Server for
OCI and Oracle SOA Suite on Marketplace. These scripts start and stop all of the Oracle WebLogic processes
(administration server, managed server, and node manager) or each process
separately.
For switchover and failover operations performed by OCI Full Stack Disaster Recovery Service, Oracle recommends using the following scripts. These example
scripts make use of the provided wls_stop.sh
and
wls_start.sh
scripts (they invoke them with
specific options), and will be called from custom plan groups when
you define the DR plans later:
Create a Script to Change the DNS Front-end Name
You can add a custom plan group and steps to automate changing DNS to change the front-end DNS record in your DNS provider.
If you're using Oracle Cloud Infrastructure DNS, then example of scripts for this are available in the Download Scripts section of this document.
- When switching over to Region 2, you must run the script that updates the front-end name DNS record to point to Load Balancer’s IP of Region 2. Place the script for this in one of the Region 2 mid-tier hosts.
- When switching over to Region 1, run the script that updates the fronted name DNS record to point to Load Balancer’s IP of Region 1. Place the script for this in one of the Region 1 mid-tier host.
- Alternatively, you can create an Oracle Cloud Infrastructure function in each site that runs the appropriate script in a serverless mode.