All Products
Search
Document Center

Data Transmission Service:Create a DTS task in which the source or destination database is a high-availability MongoDB database

Last Updated:Apr 21, 2025

If you use a self-managed MongoDB database as the source or destination database in a data synchronization or migration task configured in the Data Transmission Service (DTS) console, you can specify multiple endpoints for the MongoDB database to enhance the stability of data synchronization or migration.

Prerequisites

  • The CIDR blocks of DTS servers are added to the IP address whitelist of the self-managed MongoDB database to allow DTS to access the database. For more information, see Add the CIDR blocks of DTS servers.

  • The endpoints of multiple nodes of the self-managed MongoDB database are obtained and can be connected.

    Note

    You must obtain the endpoints of multiple shard nodes only if the source database is a self-managed MongoDB database that uses the sharded cluster architecture.

Usage notes

  • You can specify multiple endpoints for the source or destination MongoDB database in a DTS task only on the new version of the task configuration page.

  • You can specify multiple endpoints for the source or destination MongoDB database only if you set the Access Method parameter to Express Connect, VPN Gateway, or Smart Access Gateway, Public IP Address, or Cloud Enterprise Network (CEN).

Procedure

  1. Go to the Data Synchronization Tasks or Data Migration Tasks page.

    1. Log on to the DTS console.

    2. In the left-side navigation pane, click Data Synchronization or Data Migration.

    3. On the top navigation bar, select the region in which a data synchronization or migration task resides.

  2. Click Create Task to go to the task configuration page.

  3. Configure the parameters for the source or destination database.

    The following table describes the parameters. You can configure other parameters based on your business requirements.

    Parameter

    Description

    Database Type

    Select MongoDB.

    Access Method

    Select Express Connect, VPN Gateway, or Smart Access Gateway, Cloud Enterprise Network (CEN), or Public IP Address.

    Architecture

    Select Replica Set or Sharded Cluster.

    Endpoint Type

    Select Multi-node.

    Endpoint

    Enter the endpoints of the self-managed MongoDB database or a mongos node.

    Note
    • If you set the Architecture parameter to Replica Set, specify the Endpoint parameter. If you set the Architecture parameter to Sharded Cluster, specify the Mongos endpoint parameter.

    • An endpoint is in the <IP>:<Port> format. Replace <IP> with a domain name or an IP address. We recommend that you use a domain name that is publicly resolvable.

    • Separate multiple endpoints with line feeds.

    Mongos endpoint

    Access to Multiple Shard Nodes

    The information that is used to access the shard nodes of the self-managed MongoDB database.

    Note

    This parameter is available only if the self-managed MongoDB database is the source database, the Architecture parameter is set to Sharded Cluster, the Migration Method parameter is set to Oplog and the Endpoint Type parameter is set to Multi-node.

    1. Click Add to the right of Access to Multiple Shard Nodes.

    2. In the Shard Node Endpoint field, enter the endpoint of a shard node of the self-managed MongoDB database.

      Note
      • If you set the Architecture parameter to Replica Set, specify the Endpoint parameter. If you set the Architecture parameter to Sharded Cluster, specify the Mongos endpoint parameter.

      • An endpoint is in the <IP>:<Port> format. Replace <IP> with a domain name or an IP address. We recommend that you use a domain name that is publicly resolvable.

      • Separate multiple endpoints with line feeds.

    3. Repeat the preceding steps to configure the access information for each shard node.

  4. Perform the subsequent operations based on your business requirements.

    For more information, see Synchronize data from a MongoDB database or Migrate data from a MongoDB database.