Set up cross region disaster recovery

High Availability is a system's ability to remain operational and accessible at a high percentage of time even during regional outages. To achieve High Availability with OCI GoldenGate, create a peer deployment in a different OCI region than your primary deployment.

Before you begin

To successfully complete this quickstart, you must have:

  • A free or paid Oracle Cloud account
  • Access to more than one OCI region
  • Access to OCI GoldenGate
  • An existing OCI GoldenGate deployment in any OCI region

Task 1: Prepare for cross region disaster recovery

  1. Review the minimum recommended policies and add the policies in your tenancy as needed.
    Ensure that you:
    • Create a dynamic group to allow GoldenGate deployments to access resources in your tenancy.
    • Add policies to allow GoldenGate deployments to use OCI Secrets replication and use/manage OCI secrets resources
  2. As a best practice, store your deployments' and connections' credentials in OCI Vault as secrets.
    1. Edit existing connections to use Secrets, or unassign existing connections from your deployment and then create and assign new connections that use Secrets.
    2. Enable cross region replication at the Secret level.
    3. Ensure the following policy was added to allow your deployment to leverage Secrets cross region replication:
      Allow dynamic-group '<IAM Domain>'/'<dynamic-group-name>' to use secret-replication in tenancy 
  3. Activate disaster recovery for the source and target databases. For example, use Autonomous Data Guard for your Autonomous AI Databases.

    Note:

    When you enable Autonomous Data Guard for existing Autonomous AI Databases, you must refresh your connections to ensure the connection string OCI GoldenGate uses contains both the primary and standby database details.

Task 2: Enable disaster recovery

  1. In the Oracle Cloud navigation menu, select Oracle AI Database, and then select GoldenGate.
  2. In the GoldenGate menu, select Deployments.
  3. On the Deployments page, select your deployment.
  4. On the deployment details page, select Disaster recovery.
  5. On the deployment's Disaster recovery page, click Add peer.
  6. In the Add peer deployment panel, select the Region in which to create the standby peer.

    Tip:

    It's recommended to select the same region as your standby databases.
  7. Deselect Automatically select the best placement to review the available options:
    1. In a region with multiple Availability Domains, you can select an Availability Domain (AD) that is different from the primary deployment.
    2. (Optional) After selecting an AD, you can select a Fault Domain (FD).
  8. Select Automatically select the best placement to have the system select the best AD/FD combination in the standby region you selected.
  9. Select the subnet to which the OCI GoldenGate service tenancy creates a private endpoint to access your deployment.
  10. (Optional) Select the subnet to which a load balancer will be created to enable public access, if supported by your primary deployment.
  11. Click Add. After a few minutes, the standby peer deployment becomes Active.

Task 3: Switchover

  1. After the standby peer deployment is Active, from the standby peer's Actions menu, select Switchover.
  2. In the Switchover dialog, click Switchover to confirm the action.

Both the primary and standby peer deployments' statuses change to Updating. During switchover, the primary deployment becomes the new standby peer while the standby becomes the new primary deployment.

After a few minutes, the deployments become Active again, at which point you can log in.

Note:

Processes set to auto start will automatically start within the new deployment.

Task 4: Update Distribution Paths

If using Distribution Paths to connect your GoldenGate deployments, you must edit the Distribution Paths after switchover completes and update the target host.
To update the Distribution Path target host:
  1. For GoldenGate versions 23.10 and above:
    1. In the OCI GoldenGate deployment console, select Distribution Service.
    2. View the Path Information of the Target-initiated Path or Distribution Path, and then edit the Source or Target URI, respectively.
  2. Alternatively, you can use the following REST API call to perform the update:
    curl -u <username>:<password> -X PATCH https://<deployment-host>:443/services/v2/sources/<distribution-path-name> -d '{
    "target": {   
    "uri": "wss://<new-target-deployment-host>:443/services/v2/targets?trail=<trail-name>"
    }
    }' | jq .
    
  3. 2. If using IAM authentication, you must also create a new GoldenGate connection for your target standby deployment and assign it to the source deployment.