Note:
- This tutorial requires access to Oracle Cloud. To sign up for a free account, see Get started with Oracle Cloud Infrastructure Free Tier.
- It uses example values for Oracle Cloud Infrastructure credentials, tenancy, and compartments. When completing your lab, substitute these values with ones specific to your cloud environment.
Enable Custom Prechecks in Oracle Cloud Infrastructure Full Stack Disaster Recovery
Introduction
Oracle Cloud Infrastructure Full Stack Disaster Recovery (OCI Full Stack DR) orchestrates the transition of compute, database, and applications between Oracle Cloud Infrastructure (OCI) regions from around the globe with a single click. Customers can automate the steps needed to recover one or more business systems without redesigning or re-architecting existing infrastructure, databases, or applications and without the need for specialized management or conversion servers.
Full Stack Disaster Recovery now supports user-defined precheck steps, allowing users to integrate custom validations into their DR plans. This feature enhances DR plans by allowing users to incorporate specific checks that align with their unique infrastructure and application requirements, ensuring comprehensive validation before DR plan execution.
Initial Deployment Architecture
-
1 x Moving compute on the primary region (
vmapp01). -
1 x Volume group in primary region containing boot and block volume for
vmapp01.

Note: Primary region is London and standby region is Frankfurt.
Objectives
Configure the newly introduced feature in OCI Full Stack DR that enables users to define their own custom prechecks.
OCI Full Stack DR performs comprehensive prechecks before a DR plan is executed to ensure readiness of the application stack and recovery environments so that the recovery operation will succeed in the standby region.
The following tasks will be covered in this tutorial.
- Task 1: Add the compute instance (
vmapp01) to the primary DR protection group. - Task 2: Add the volume group (
vgapp01) to the primary DR protection group. - Task 3: Generate a switchover plan.
- Task 4: Add a user-defined precheck.
- Task 5: Run the user-defined and built-in prechecks.
- Task 6: Verify the prechecks output log.
Prerequisites
-
This tutorial assumes that you have already created and associated the primary and standby DR Protection Groups. For more information on how to create DR protection groups see Manage Disaster Recovery Protection Groups
-
Create a bash script on the VM instance (vmapp01). For example: you can create a simple script that prints a line on the console using an ‘echo’ command like the one bellow:
#!/bin/bash echo "Hello World" -
Enable run command on the VM instance (
vmapp01). For more information, see Running Commands on an Instance. -
This tutorial assumes that the reader has OCI administrator privileges and the required Oracle Cloud Infrastructure Identity and Access Management (OCI IAM) policies for OCI Full Stack DR are already in place. For more information, see Configuring Identity and Access Management (IAM) policies to use Full Stack DR and Policies for Full Stack Disaster Recovery.
Task 1: Add the Compute Instance (vmapp01) to the Primary DR Protection Group
-
In the primary DR protection group (
DRPG_CPC_LON), select Members and click Add member.
-
Add the compute VM (
vmapp01) as a member.

Task 2: Add the Volume Group (vgapp01) to the Primary DR Protection Group
-
In the primary DR protection group (
DRPG_CPC_LON), select Members and add the volume group (vgapp01) as a member.
Task 3: Generate a Switchover Plan
Switchover plan is a type of DR plan that performs a planned transition of services from the primary DR protection group to the standby DR protection group.
Create a switchover plan in standby DR protection group.DRPG_CPC_FRAN.
-
Select Plans and click Create plan.

-
Enter Name as Switchover and select Plan type as Switchover (planned).

-
Click Create.

Task 4: Add a User-Defined Precheck
-
Open the switchover plan created in Task 3.

-
Click the three dots (ellipsis) icon at the end of the row labelled Prechecks – Built-in in the Plan Groups table.

-
Click Add user defined precheck.

-
You will be prompted for more information about the script you want to run as a precheck. Click Add Step.


Task 5: Run the User-Defined and Built-In Prechecks
Note:
The DR plans in the standby region should all be active at this point, which means OCI Full Stack DR can execute the active failover plans even if a catastrophic event causes an outage at the primary region. Switchovers are disruptive and require an outage. Therefore, this task can be performed at a later point in time when an outage can be scheduled to execute the switchover plan in the current standby region.
If you cannot complete this task now, do not forget to complete this task at some point in the future.
Run the prechecks for the switchover plan you just created in the current standby region, then run the switchover plan if the prechecks succeed. Run the prechecks as an independent operation first as a best practice.
-
Open the switchover plan in the standby region.
-
Click Run Prechecks.

-
Again, click Run Prechecks in the confirmation box to continue.

Ensure the prechecks complete successfully as shown in the following image. You may need to remediate any failed precheck steps at this point and then run the precheck again until all steps succeed.

Task 6: Verify the Prechecks Output Log
-
Click the three dots (ellipsis) icon on the right side of Run Script - User Defined Custom Precheck.

-
Select View Logs.

Verify the output of your User Defined Custom Precheck.

Next Steps
There are two best practices that should be incorporated into the normal day-to-day operations to help ensure the readiness of your DR plans.
- Regular periodic execution of prechecks.
- Regular periodic execution of DR Drills.
Think about scheduling weekly prechecks of all DR plans in the standby DR Protection Group. Prechecks can be run at any time and have zero impact on production workloads. This will help ensure integrity of your DR plans, catching missing member resources, missing networks, the inability to find expected scripts called by user-defined steps, and so on.
Another very important way of validating the readiness of your DR is to schedule periodic DR drills once a month or quarter. DR drills also have zero impact on production workloads, but give you the ability to validate recovery of compute, storage, Oracle databases and backend sets for load balancers in the standby region with the click of a single button. For more information, see:
-
OCI Full Stack Disaster Recovery expands its built-in capabilities for database and storage
-
OCI Full Stack Disaster Recovery Support for OCI Load Balancer
Related Links
-
Oracle Cloud Infrastructure (OCI) Full Stack Disaster Recovery
-
Join #full-stack-dr slack channel
Acknowledgments
- Author - Raphael Teixeira (Principal member of technical staff for Full Stack DR engineering)
More Learning Resources
Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.
For product documentation, visit Oracle Help Center.
Enable Custom Prechecks in Oracle Cloud Infrastructure Full Stack Disaster Recovery
G33347-01
Copyright ©2025, Oracle and/or its affiliates.