Create DR Plans

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:

  1. Choose the name of the plan

  2. Choose a type of the plan. There can be only 2 types of plan right now specified - Switchover and Failover

  3. 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:

  1. Name of the Plan Group: Stop Dbvisit

  2. Switch to Add after

  3. choose Built-In Prechecks, so that the Stop Dbvisit job will start right after the Prechecks finish

  4. Press Add Step button

During Plan step creation, fill in following:

  1. Name of the Plan Step: Stop Dbvisit

  2. Choose action in case of error: Stop on error

  3. Specify timeout: 600

  4. Choose region - choose primary one

  5. Switch to “Run local script”

  6. Choose an instance where the script is run: Control Center instance

  7. Fill in the full path and name of the script: /home/opc/scripts/stop_dbvisit.sh

  8. Specify user, under which the scripts were installed: opc

  9. 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:

  1. Name of the Plan Group: Change etc hosts

  2. Switch to Add after

  3. choose Launch Compute Instances, so that the Stop Dbvisit job will start right after the Launch Compute Instances plan group

  4. Press Add Step button

 

During Plan step creation, fill in following:

  1. Name of the Plan Step: Change etc hosts

  2. Choose action in case of error: Stop on error

  3. Specify timeout: 600

  4. Choose region - choose primary one

  5. Switch to “Run local script”

  6. Choose an instance where the script is run: Control Center instance

  7. 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

  8. Specify user, under which the scripts were installed: opc

  9. 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:

  1. Name of the Plan Group: Start Dbvisit

  2. Switch to Add after

  3. choose Change etc hosts, so that the Stop Dbvisit job will start right after the “Change etc hosts” plan group

  4. Press Add Step button

During Plan step creation, fill in following:

  1. Name of the Plan Step: Start Dbvisit

  2. Choose action in case of error: Stop on error

  3. Specify timeout: 600

  4. Choose region - choose primary one

  5. Switch to “Run local script”

  6. Choose an instance where the script is run: Control Center instance

  7. Fill in the full path and name of the script: /home/opc/scripts/start_dbvisit.sh

  8. Specify user, under which the scripts were installed: opc

  9. 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:

  1. Name of the Plan Group: Start Dbvisit

  2. Switch to Add after

  3. choose Start Dbvisit, so that the Switchover job will start right after the “Start Dbvisit” plan group

  4. Press Add Step button

During Plan step creation, fill in following:

  1. Name of the Plan Step: Database Switchover

  2. Choose action in case of error: Stop on error

  3. Specify timeout: 3600

  4. Choose region - choose primary one

  5. Switch to “Run local script”

  6. Choose an instance where the script is run: Control Center instance

  7. Fill in the full path and name of the script: /home/opc/scripts/switchover.sh

  8. Specify user, under which the scripts were installed: opc

  9. 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: