Tanzu for MySQL on Cloud Foundry 3.3

Migrating HA instances for multi-site replication

Last Updated February 24, 2025

Tanzu for MySQL v3.2+ allows you to configure newly-provisioned MySQL high-availability (HA) service instances to be the leader in a multi-site deployment. This topic contains instructions for performing migration of pre-v3.2 instances so they can use multi-site replication.

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.

For more information about multi-site configuration, see Using VMware Tanzu for MySQL for multi-site replication.

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

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 the Multi‑Site Replication instance to your new HA

  3. Configure your 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 in Create a service instance.

  2. Create a manual backup of your old HA service instance, following the procedure in Manually back up a service instance.

  3. Restore your manual backup to the new Multi‑Site Replication service instance you created in Step 1, following the steps in Restore a service instance.

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

Scale up Multi‑Site Replication to your 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.

    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
    

    You may ignore the 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, the Multi‑Site Replication instance can be safely updated.

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

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

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

    The procedure in Configure Multi-Site Replication references Multi‑Site Replication instances in your primary and secondary foundations. This procedure also applies in the scenario in which you are configuring a new high-availability instance in your primary foundation. For example, you 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 Configure your new HA as a multi-site replication leader, after you created your Secondary foundation Multi‑Site Replication instance, you can use the cf mysql-tools plug-in to perform the subsequent steps. The plugin supports configuring both Multi‑Site Replication and also High-Availability instances as multi-site leaders.

For more information about the cf mysql-tools plug-in, see Create a leader-follower service instance using mysql-tools.