Create Switchover DR Plan
DR plans can be created and modified only on the standby DR group.
Open the DR group menu and open a detail of the standby DR group. Press “Create plan” button there:
Choose the name of the plan
Choose a type of the plan. There can be only 2 types of plan right now specified - Switchover and Failover
Press Create button
The creation of the Switchover plan lasts for some time. Once done, you can open details of the created DR plan. You can see, that there are already some DR Plan steps created. These are Plan steps care for migration of the Moving instance to the other DR group.
From Dbvisit perspective, there need to be following Plan Steps added:
stop dbvisit before the moving instance shuts down
change /etc/hosts file to match the new IP address after migration of the Central Console machine
start dbvisit processes after the network is updated
switchover database
Create Stop Dbvisit job
Press the Add Group button and specify following:
Name of the Plan Group: Stop Dbvisit
Switch to Add after
choose Built-In Prechecks, so that the Stop Dbvisit job will start right after the Prechecks finish
Press Add Step button
During Plan step creation, fill in following:
Name of the Plan Step: Stop Dbvisit
Choose action in case of error: Stop on error
Specify timeout: 600
Choose region - choose primary one
Switch to “Run local script”
Choose an instance where the script is run: Control Center instance
Fill in the full path and name of the script: /home/opc/scripts/stop_dbvisit.sh
Specify user, under which the scripts were installed: opc
Confirm by pressing Add Step
Confirm the Plan group creation by pressing “Add” button.
After some short time, the plan group should be inserted after the Built-in prechecks Plan Group.
Change /etc/hosts file Plan Group
Add another plan group and fill in following:
Name of the Plan Group: Change etc hosts
Switch to Add after
choose Launch Compute Instances, so that the Stop Dbvisit job will start right after the Launch Compute Instances plan group
Press Add Step button
During Plan step creation, fill in following:
Name of the Plan Step: Change etc hosts
Choose action in case of error: Stop on error
Specify timeout: 600
Choose region - choose primary one
Switch to “Run local script”
Choose an instance where the script is run: Control Center instance
Fill in the full path and name of the script: /home/opc/scripts/change_hosts.sh 158 157 - this script will change the /etc/hosts file and replace the 158 IP address with 157
Specify user, under which the scripts were installed: opc
Confirm by pressing Add Step
Confirm the Plan group creation by pressing “Add” button.
Create Start Dbvisit job
Press the Add Group button and specify following:
Name of the Plan Group: Start Dbvisit
Switch to Add after
choose Change etc hosts, so that the Stop Dbvisit job will start right after the “Change etc hosts” plan group
Press Add Step button
During Plan step creation, fill in following:
Name of the Plan Step: Start Dbvisit
Choose action in case of error: Stop on error
Specify timeout: 600
Choose region - choose primary one
Switch to “Run local script”
Choose an instance where the script is run: Control Center instance
Fill in the full path and name of the script: /home/opc/scripts/start_dbvisit.sh
Specify user, under which the scripts were installed: opc
Confirm by pressing Add Step
Confirm the Plan group creation by pressing “Add” button.
Create Database Switchover Plan Group
Press the Add Group button and specify following:
Name of the Plan Group: Start Dbvisit
Switch to Add after
choose Start Dbvisit, so that the Switchover job will start right after the “Start Dbvisit” plan group
Press Add Step button
During Plan step creation, fill in following:
Name of the Plan Step: Database Switchover
Choose action in case of error: Stop on error
Specify timeout: 3600
Choose region - choose primary one
Switch to “Run local script”
Choose an instance where the script is run: Control Center instance
Fill in the full path and name of the script: /home/opc/scripts/switchover.sh
Specify user, under which the scripts were installed: opc
Confirm by pressing Add Step
Confirm the Plan group creation by pressing “Add” button.
Review the whole Switchover plan
This is how the switchover plan should look like: