All Products
Search
Document Center

Microservices Engine:Migrate persistent data to an MSE ZooKeeper instance

Last Updated:Feb 05, 2024

This topic describes how to migrate persistent data from a self-managed ZooKeeper instance to an MSE ZooKeeper instance.

Prerequisites

Limits

  • If the MSE Sync tool breaks down, the synchronization service is interrupted. Therefore, we recommend that you deploy the MSE Sync tool on at least two nodes. After the migration process starts, you must complete the migration at the earliest opportunity.

  • The networks among the self-managed ZooKeeper instance, MSE Sync, and MSE ZooKeeper instance are interconnected.

  • Do not use the migration solution described in this topic to migrate service data, distributed locks, and data on ephemeral nodes.

Procedure

Step 1: Create a migration task

  1. In the left-side navigation pane of the MSE Sync tool, click Cluster Configuration. Then, click Add Cluster. In the Add Cluster dialog box, add the information about the source ZooKeeper instance, and click OK.

    Parameter

    Description

    Cluster Name

    The custom name of the self-managed ZooKeeper instance from which you want to migrate the persistent data.

    Cluster Type

    Select ZK.

    Cluster IP Address List

    Enter one or more combinations of an IP address and port number of the self-managed ZooKeeper instance. Each combination occupies one line. The default port number is 2181. Example:

    127.0.0.1:2181
    127.0.0.2:2181
    127.0.0.3:2181

    If the source instance uses a Server Load Balancer (SLB) instance for load balancing, enter the IP address and port number of the SLB instance.

  2. Click Add Cluster again to add the information about the destination ZooKeeper instance.

    • Cluster Type: Select ZK.

    • Cluster IP Address List: Enter one or more combinations of an endpoint and service port number of the MSE ZooKeeper instance. Example: mse-8b7de****-p.zk.mse.aliyuncs.com:2181.

  3. In the left-side navigation pane, click Service Synchronization. On the page that appears, click New Sync. In the New Sync dialog box, configure migration parameters.

    • Sync Mode: Select Bidirection. In this mode, data can be synchronized between the source and destination instances if data on the source or destination instance updates.

      Important

      If you select Bidirection, data on the destination instance will be synchronized to the source instance. In this case, data or an ephemeral node in the source instance may be updated during the synchronization. As a result, data errors or unexpected data deletion may occur on the source instance. Therefore, proceed with caution when you perform this operation.

    • Sync Type: Select Config. MSE Sync displays configurations of all services that are registered with the self-managed ZooKeeper instance. You can select the configurations based on your business requirements.

    • Path: the path where the persistent data that you want to migrate is stored on the self-managed ZooKeeper instance.

  4. Click OK.

    The migration task that you created is displayed on the Service Synchronization page of the MSE Sync tool.

Step 2: Verify the synchronization result

  1. Log on to the MSE console and select a region in the top navigation bar.

  2. In the left-side navigation pane, choose Microservices Registry > Instances.

  3. On the Instances page, click the name of the instance.

  4. In the left-side navigation pane, choose Data Management > Znodes. On the page that appears, check whether the persistent data is synchronized from the self-managed ZooKeeper instance to the MSE ZooKeeper instance.

Step 3: Shut down the self-managed ZooKeeper instance

  1. Shut down the self-managed ZooKeeper instance.

  2. Disable the MSE Sync tool.