tencent cloud

Feedback

Metadata Migration from Huawei Cloud

Last updated: 2023-05-16 10:56:42

    Overview

    When using a TDMQ for RocketMQ cluster, you may need to migrate your existing business, for example, from a self-built or third-party RocketMQ cluster to the TDMQ for RocketMQ cluster. This document describes how to migrate metadata from Huawei Cloud RocketMQ to TDMQ for RocketMQ.
    Note
    Both dedicated clusters and virtual clusters support metadata migration, and the migration steps are the same.

    Prerequisites

    You have created a [cluster] advance(https://www.tencentcloud.com/document/product/1113/43122!85fe5099f6807dada65d274810933389) and a namespace in the console.

    Directions

    Step 1. Export the metadata file

    1. To export metadata on the Huawei Cloud console, you need to obtain the relevant credentials of your Huawei Cloud account. Enter the My Credentials page in the console, select API Credentials, select the region where the RocketMQ cluster resides, and copy the corresponding project ID (such as 07e5d7ab260026xxxxxa3c7347b) and the region it belongs to (such as cn-north-1).
    2. Go to the RocketMQ page and get the instanceId of the instance in Huawei Cloud.
    3. Execute the following migration command on any Linux environment machine with public network connection enabled. Replace the API credential and instance ID in the command line with those obtained in the above steps.
    ./rocketmq-export hw -a YHTxxxxxxxCGNCZFGT -s bIGoRaeJRvxxxxx7pB38SD -r cn-east-3 -p 08535f7e468xxc01c392ef22a -i a21db77c-9e8f-xxxx-5456fef21ea8 -o /tmp/export-data.json
    If your machine cannot be connected to the public network, you can click to download rocketmq-export. The relevant script commands are as follows:
    Export rocketmq metadata
    
    Usage:
    rocketmq-export hw [flags]
    
    Flags:
    -a, --accessKey string (required) Access Key
    -h, --help help for hw
    -i, --instanceId string (required) Instance ID (default "a21db77c-9e8f-4f24-a3a2-5456fef21ea8")
    -o, --outputFile string Output File name (default "/tmp/export-data.json")
    -p, --projectId string (required) Project ID (default "08535f7e4680f25f2fc9c01c392ef22a")
    -r, --region string (required) Reiong (default "cn-east-3")
    -s, --sercretKey string (required) Secret Access Key
    4. Export and save the metadata file as prompted. You can also set the environment variable CONF_LOG_LEVEL=debug before the command to enable the debug mode for troubleshooting.

    Step 2. Create a migration task

    1. Log in to the TDMQ for RocketMQ console and enter the Migration to Cloud page, enter the migration task list page, and click Create Task to create a corresponding migration task.
    2. Select the migration task type:
    Cluster migration: This type of task migrates metadata from the self-built RocketMQ cluster to the TDMQ for RocketMQ cluster. The migration tool will parse the part before “%” of each topic name in the open-source dashboard as the namespace name by default, so that you can create multiple logically isolated namespaces. If no topic name can be parsed in the self-built cluster, a namespace named default will be generated automatically.
    Specified namespace import: This type of task migrates metadata from the self-built RocketMQ cluster to a specified TDMQ for RocketMQ namespace. If there are no namespaces in topics in the self-built cluster, you can select specific topics and groups you want to import, and specify the TDMQ for RocketMQ namespaces to which they are imported to distinguish between businesses or environments.
    3. Upload the metadata file obtained in step 1 and select the topics and groups you want to import.
    Note
    Up to 1,000 topics and 1,000 groups can be imported in a single task. Excess data will fail to be imported.

    Step 3. Check the task status

    After the task is successfully created, enter the task list to view the task status. If there is too much data, the task needs to load for a while. Click View Details to view the specific running status of the task.
    If the task status is Some failed or All failed, you can filter causes of the failures in the Task Status column.
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support