use admindb.createUser({user: "username",pwd: "password",roles:[{role: "readAnyDatabase", db: "admin"},{role: "read", db: "local"}]})
db.createUser({user:"username",pwd:"password",roles:[{role:"readWriteAnyDatabase",db:"admin"}]})
Configuration Parameter | Description |
Creation Mode | Create new task: Create a brand new task. Create similar task: Quickly create a task with the same configuration as a previous task. In the new task, the options for database type, access method, billing mode, and migration type are pre-filled to match the previous task. Users can modify these options as needed based on the current situation. |
Source Instance Type | Select based on the type of your source database. This cannot be changed after purchase. For this scene, select MongoDB. |
Source Instance Region | Select the region where the source database is located. If the source is a self-hosted database, select the region closest to the self-hosted database. |
Target Instance Type | Select based on the type of your target database. This cannot be changed after purchase. For this scene, select MongoDB. |
Target Instance Type | Select the region where the target database is located. |
Version | The default is NewDTS; no modification is needed. |
Specification | Currently, only the Medium specification is supported. |
Task Name | Select Name After Creation. The task name will be the same as the task ID by default. After the migration task is created, you can rename the task. Select Name Now, and enter the task name in the input field below. |
Configuration Parameter | Description |
Task Name | Set a business-relevant name for easy task identification. |
Run Mode | Immediate execution: The task will start immediately after the pre-check passes. Scheduled execution: Set a specific start time for the task. The task will not start immediately after the pre-check passes, but will instead start at the scheduled time. |
Access Type | Select based on your specific scene. For preparation steps related to different access types, see the Overview. Public Network: The source database can be accessed via a public IP. Self-Build on CVM: The source database is deployed on a Tencent Cloud Service CVM. Direct Connect: The source database can connect to Tencent Cloud Virtual Private Cloud via Direct Connect. VPN Access: The source database can connect to Tencent Cloud Virtual Private Cloud via VPN Connections. Database: The source database is a TencentDB instance. CCN: The source database can connect to Tencent Cloud Virtual Private Cloud via Cloud Connect Network. If the source database is a self-hosted IDC database or a database from another cloud provider, you can choose Public Network/Direct Connect/VPN Access/CCN as the access method. If the source database is self-hosted on a CVM, select Self-Hosted on CVM as the access method. If the source database is a TencentDB instance, select Database as the access method. |
Architecture | This parameter is displayed when Access Type is set to Self-Build on CVM/Direct Connect/VPN Access/CCN. Select it according to your actual situation. Replica set: Refers to an architecture where the source database is a replica set, consisting of one Primary node and one or more Secondary nodes. Cluster migration: Refers to an architecture where the source database is a sharded cluster, consisting of components such as mongos nodes, config servers, and shard nodes. Single node: Refers to an architecture where the source database cluster consists of a single node that handles both read and write operations. Note: Once you select an architecture type, and the connectivity test passes. It cannot be changed to another architecture type; otherwise, the task will encounter errors. |
Cluster Migration | When Architecture is set to Cluster migration, the following parameters need to be configured. Node - mongod: Enter the IP and port, or the domain name and port, of the mongod node. For multiple nodes, enter each on a new line; only one mongod needs to be entered for each shard. Example: 1xx.xx.55.77:6xx9. Node - mongos: Enter the IP and port, or the domain name and port, of the mongos node. Node - Config Server: Enter the IP and port, or the domain name and port, of the Config Server node. |
Public Network | When Access Type is set to Public Network, the following parameters need to be configured. Host address: The IP address or domain name of the source database. Port: The port used by the source database. |
Self-Build on CVM | When Access Type is set to Self-Build on CVM", the following parameters need to be configured. CVM instance: The instance ID of the CVM. Port: The port used by the source database. |
Direct Connect | When Access Type is set to Direct Connect, the following parameters need to be configured. VPC Direct Connect Gateway: Only the VPC Direct Connect Gateway is supported for Direct Connect. Confirm the network type associated with the gateway. VPC: Select the VPC and subnet. Host address: The IP address or the domain name of the source database. Port: The port used by the source database. |
VPN Access | When Access Type is set to VPN Access, the following parameters need to be configured. VPN gateway: Select the VPN gateway instance that is accessed through the VPN gateway. VPC: Select the VPC and subnet. Host address: The IP address or the domain name of the source database. Port: The port used by the source database. |
Database | When Access Type is set to Database, the following parameters need to be configured. Cloud database instance: Select the instance ID of the source database. |
CCN | When Access Type is set to CCN, the following parameters need to be configured. When using CCN for access, both same-account CCN and cross-account CCN are supported. Due to the complexity of network configuration, see Migrating Self-built Databases to Tencent Cloud via Cloud Connect Network. Host network environment: Select according to your actual situation. For example, if the source database is a TencentDB instance, select Tencent Cloud; if the source database is a self-hosted IDC database, select Self-built IDC; if the source database is from another cloud provider, select the corresponding network. Host address: The host IP address or the domain name of the source database. Port: The port used by the source database. CCN instance account My account: The CCN resources and DTS belong to the same Tencent Cloud root account. Other account: The CCN resources and DTS belong to different Tencent Cloud root accounts. VPC CCN: The name of the CCN instance. Access VPC: Select the VPC and subnet to be accessed. The Access VPC refers to the VPC that is connected to the DTS migration linkage within the CCN. Choose a VPC other than the one that the source database belongs to from all the VPCs associated with the CCN. Access VPC region: The region of the Access VPC should match the region of the source database selected when purchasing the task. If they do not match, DTS will change the region of the source database selected in the purchased task to the Access VPC region. |
Authentication Required | Whether security authentication for the username and password of the source database is required. If Required is selected, the following parameters need to be filled in. Authentication database: The name of the database that requires authentication, i.e., the database name associated with the account executing the migration task. Only admin is supported. Authentication mechanism: Currently, only SCRAM-SHA-1 is supported. Account and password options Same account and password: Select this parameter if the same account and password are used for the roles of mongod, mongos, and Config Server, and enter the unified account and password. Different accounts and passwords: Select this parameter if different accounts and passwords are used for the roles of mongod, mongos, and Config Server, and enter the account and password for each mongod, mongos, and Config Server separately. |
Account/Password | Account/Password: The account and password of the source database. |
Configuration Parameter | Description |
Migration Type | Select based on your scene. Full migration: Migrates the entire database, including only the data that exists in the source database at the time the task is initiated, and not including any new data written to the source database after the task starts. Full + Incremental migration: Migrates both the existing data in the source database at the time the task is initiated and any new data written to the source database in real-time after the task starts. If data is being written to the source database during the migration and you need a seamless migration without downtime, select this option. |
Data Consistency Check | Data consistency check is supported only when the Migration Type is configured as Full + Incremental Migration, allowing a detailed comparison of data between the source and target databases after migration. When the Migration Type is configured as Full Migration, consistency check is disabled by default. Full object consistency check: After the incremental synchronization is completed, DTS will automatically trigger a consistency check task. No check: Data consistency will not be checked. If needed, you can manually trigger a consistency check after the incremental synchronization is completed. For details, see Creating Data Consistency Check Task. |
Data Check | When Data Consistency Check is set to Full migration object detection, the default consistency check type displayed is Content Validation. |
Migration Objects | Entire instance: Migrates the entire instance, excluding system databases, such as system objects in PostgreSQL. However, it will migrate roles and user metadata definitions. Specified objects: Migrates only the specified objects. |
Specified Objects | Select the objects to be migrated from the source database and move them to the Selected Object box. |
Was this page helpful?