A new feature in VMware Tanzu for MySQL v3.2 lets you configure newly-provisioned MySQL high-availability (HA) service instances to be the leader in a multi-site deployment. This new feature lets you: - create a new HA service instance in your Primary foundation to act as the leader, - create a Multi‑Site Replication service instance (using a Multi‑Site Replication service plan) in your Secondary foundation to be the follower, and - apply configuration to both instances, establishing replication between that Primary HA leader and your Secondary Multi‑Site Replication follower.

More information on multi-site configuration is in Using Tanzu MySQL for VMs for multi-site replication.

HA service instances created with pre-3.2 tiles can not be configured for multisite replication. To apply this new HA multi-site feature to older HA instances, you migrate that instance’s data to a new HA instance via a backup and restore operation.

This page contains instructions for performing this migration.

Migrating older high-availability instances for multi-site replication

To enable multi-site replication of data hosted on an older (pre-3.2) high-availability service instance:

  1. Backup and restore your old HA to a new Multi‑Site Replication instance
  2. Scale up Multi‑Site Replication instance to new HA
  3. Configure new HA as multi-site replication leader

Backup and restore your old HA to a new Multi‑Site Replication instance

  1. Create a new service instance from a Multi‑Site Replication plan, following the procedure Create a service instance in Using VMware SQL with MySQL for Tanzu Application Service.

  2. Create a manual backup of your old HA service instance, following the procedure Manually back up a service instance in Backing up and restoring VMware SQL with MySQL for Tanzu Application Service.

  3. Restore your manual backup to the new Multi‑Site Replication service instance you created in Step 1, following the procedure Restore a service instance in Backing up and restoring VMware SQL with MySQL for Tanzu Application Service.

More information on backup and restore is in Backing up and restoring VMware SQL with MySQL for Tanzu Application Service.

Scale up Multi‑Site Replication to new HA

  1. Update your new Multi‑Site Replication service instance to a high-availability service instance by following the procedure in Migrate data to a different plan in Using VMware SQL with MySQL for Tanzu Application Service.

    For example, if your new Multi‑Site Replication instance is named new-leader and your HA configured plan name is mysql-high-availability, you would type:

    cf update-service new-leader -p mysql-high-availability
    

    Note: - You may ignore those instructions’ warning against running cf update-service... to migrate Multi‑Site Replication instances to “a plan of another topology”. That warning applies to instances already configured for multi-site replication (which cf update-service breaks). Since we have not yet finished configuring multi-site replication, our Multi‑Site Replication instance can be safely updated.

  2. Once that update is completed, migrate any application bindings and service keys from your old HA instance to this new HA instance.

Configure new HA as multi-site replication leader

  1. Log in to your Secondary foundation and create a Multi‑Site Replication service instance from a multi-site plan, following the procedure in Create Multi-Site Replication service instances.

    Note: - Skip the procedure’s instructions for creating a service instance in your Primary foundation; the above HA instance is your primary service instance. You need only create a Multi‑Site Replication service instance in your secondary foundation. - Your secondary instance must be a Multi‑Site Replication instance; you cannot replicate from one HA instance to a second HA instance. (If your secondary instance becomes the primary instance following a multi-site failover or switchover, it can be updated to an HA instance at that time.)

  2. Configure both your Primary HA and Secondary Multi‑Site Replication service instances for multi-site replication, following the procedure in Configure Multi-Site Replication.

    Note: - That procedure references Multi‑Site Replication instances in your primary and secondary foundations. That same procedure applies in our scenario where you are configuring a new high-availability instance in your primary foundation. For example, you will apply the cf update-service PRIMARY-INSTANCE -c HOST-INFO command to your primary HA instance.

Other Notes and Considerations

cf mysql-tools plugin HA leaders

In the above Configure new HA as multi-site replication leader section, after you created your Secondary foundation Multi‑Site Replication instance, you may use the cf mysql-tools plugin to perform the subsequent steps. The plugin supports configuring both Multi‑Site Replication and also High-Availability instances as multi-site leaders.

More information on the cf mysql-tools plugin can be found in Create a leader-follower service instance using mysql-tools

check-circle-line exclamation-circle-line close-line
Scroll to top icon