tencent cloud

Feedback

Metadata Migration from ONS 4.0

Last updated: 2023-04-12 11:30:31

    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 AlibabaMQ for Apache RocketMQ (formerly ONS) 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 and a namespace in the console.

    Directions

    Step 1. Export the metadata file

    1. To export the metadata in the AlibabaMQ for Apache RocketMQ console, you need to obtain the AccessKey ID and AccessKey Secret of the Alibaba Cloud root account. For details, see Documentation.
    2. Run the following migration command on any server in Linux environment that is connected to the public network.
    CONF_ACCESSKEY_ID=LTAD****k59ppyN CONF_ACCESSKEY_SECRET=Xx8e86****L2lgI38Z /bin/bash -c "$(curl -fsSL https://rocketmq-1306598660.cos.ap-guangzhou.myqcloud.com/export-ali.sh )"
    Notes
    Set the values of CONF_ACCESSKEY_ID and CONF_ACCESSKEY_SECRET to the AccessKey ID and AccessKey Secret you obtained, respectively.
    3. 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, go to 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.
    Notes
    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, you can go to the task list to check its status. If there is too much data, it may take a period of time to load the task. Click View Details, and you can check the task status.
    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