use admindb.createUser({user: "username",pwd: "password",roles:[{role: "readAnyDatabase", db: "admin"},{role: "read", db: "local"}]})
TencetDTSData
during data migration.Operation Type | Supported SQL Operations |
DML | INSERT, UPDATE, DELETE |
DDL | INDEX: createIndexes, createIndex, dropIndex, dropIndexes COLLECTION: createCollection, drop, collMod, renameCollection, convertToCapped DATABASE: dropDatabase, copyDatabase |
Type | Environment Requirements |
Requirements for the source database | The server where the source database resides must have enough outbound bandwidth; otherwise, the migration speed will be affected. The user provided by the source database must have the permission to read the database. The source database cannot have a database named TencetDTSData .If the source database is in cluster mode, the balancer needs to be disabled before incremental sync. Oplogs can be obtained from the source database during full + incremental migration. |
Requirements for the target database | The target database space must be at least 1.3 times the space of the collections to be migrated in the source database. The user provided by the target database must have the root permission. The target database cannot have a database named TencetDTSData .The target database cannot have collections with the same name as those in the source database. If the source database is a sharded database, you need to correctly enter the mongos, config server, and mongod node information. The target database cannot have active businesses; otherwise, an alarm will be reported. The shard keys of the source and target databases must be the same; otherwise, an alarm will be reported. |
Configuration Item | Description |
Source Instance Type | Select the source database type, which cannot be changed after purchase. In this scenario, select MongoDB. |
Source Instance Region | Select the region where the source database resides. If the source database is a self-built one, select a region nearest to it. |
Target Instance Type | Select the target database type, which cannot be changed after purchase. In this scenario, select MongoDB. |
Target Instance Region | Select the region where the target database resides. |
Specification | Select the specification of the migration link based on your business needs. For the performance and billing details of different specifications, see Billing Overview. |
Setting Type | Configuration Item | Description |
Task Settings | Task Name | Set a task name that is easy to identify. |
| Running Mode | Immediate execution: The task will be started immediately after the task verification is passed. Scheduled execution: The task will be automatically started at the execution time you specify. |
Source Database Settings | Source Database Type | The source database type selected during purchase, which cannot be changed. |
| Region | The source database region selected during purchase, which cannot be changed. |
| Access Type | Select a type based on your scenario. This scenario takes Direct Connect as an example. For the preparations for different access types, see Overview. Public Network: The source database can be accessed through a public IP. Self-Build on CVM: The source database is deployed on a CVM instance. For more information on CVM, see Cloud Virtual Machine Documentation. Direct Connect: The source database can be interconnected with VPCs through Direct Connect. For more information on Direct Connect, see Direct Connect Documentation. VPN Access: The source database can be interconnected with VPCs through VPN Connections. For more information on VPN Connections, see VPN Connections Documentation. Database: The source database is a TencentDB database. CCN: The source database can be interconnected with VPCs through CCN. For more information on CCN, see Cloud Connect Network Documentation. VPC: The source and target databases are both deployed in Tencent Cloud VPCs. For more information on VPC, see Virtual Private Cloud Documentation. |
| Architecture | Select the architecture of the source database. This scenario takes Cluster migration as an example. The selected architecture type cannot be modified after the connectivity test is performed; otherwise, an error will be reported. |
| VPC-Based Direct Connect Gateway | Only VPC-based Direct Connect gateway is supported when the access type is Direct Connect. Confirm the type of the network associated with the gateway. |
| VPC | Select a VPC and subnet associated with the VPC-based Direct Connect gateway. |
| Node – mongod | Enter the IP/domain name and port of the mongod node, such as 1xx.3.xx.77:6xx9. For multiple nodes, separate their IPs/domain names and ports by carriage return. |
| Node – mongos | Enter the IP/domain name and port of the mongos node. |
| Node – Config Server | Enter the IP/domain name and port of the config server |
| Authentication Required | Select whether to check the security of username and password in the source database. |
| Authentication Database | Enter the name of the database to be authenticated, that is, name of the database of the account executing the migration task, such as admin . |
| Authentication Mechanism | SCRAM-SHA-1 is supported currently |
| Account & Password Selection | If the three nodes of mongod, mongos, and config server in the source database have the same account and password, select Same account & password; otherwise, select Different accounts & passwords and enter their respective accounts and passwords. |
Target Database Settings | Target Database Type | The target database type selected during purchase, which cannot be changed. |
| Region | The target database region selected during purchase, which cannot be changed. |
| Access Type | In this scenario, select Database. |
| Database Instance | Select the instance ID of the target database. |
| Account | Account of the target database, which must have the required permissions. |
| Password | Password of the target database account |
Setting Type | Configuration Item | Description |
Task Settings | Task Name | Set a task name that is easy to identify. |
| Running Mode | Immediate execution: The task will be started immediately after the task verification is passed. Scheduled execution: The task will be automatically started at the execution time you specify. |
| Tag | Tags are used to manage resources by category in different dimensions. If the existing tags do not meet your requirements, go to the console to create more. |
Source Database Settings | Source Database Type | The source database type selected during purchase, which cannot be changed. |
| Region | The source database region selected during purchase, which cannot be changed. |
| Access Type | If the source database is a TencentDB instance, select Database. For the preparations for different access types, see Overview. Public Network: The source database can be accessed through a public IP. Self-Build on CVM: The source database is deployed on a CVM instance. For more information on CVM, see Cloud Virtual Machine Documentation. Direct Connect: The source database can be interconnected with VPCs through Direct Connect. For more information on Direct Connect, see Direct Connect Documentation. VPN Access: The source database can be interconnected with VPCs through VPN Connections. For more information on VPN Connections, see VPN Connections Documentation. Database: The source database is a TencentDB database. CCN: The source database can be interconnected with VPCs through CCN. For more information on CCN, see Cloud Connect Network Documentation. VPC: The source and target databases are both deployed in Tencent Cloud VPCs. For more information on VPC, see Virtual Private Cloud Documentation. |
| Cross-/Intra-Account | You need to configure this option when the access type is "Database". Intra-account: The source and target database instances belong to the same Tencent Cloud root account. Cross-account: The source and target database instances belong to different Tencent Cloud root accounts. For detailed directions, see Cross-Account TencentDB Instance Migration. |
| Database Instance | Select the instance ID of source database. |
| Account | Account of the source TencentDB for MongoDB database, which must have the required permissions. |
| Password | Password of the source TencentDB for MongoDB database. |
Target Database Settings | Target Database Type | The target database type selected during purchase, which cannot be changed. |
| Region | The target database region selected during purchase, which cannot be changed. |
| Access Type | In this scenario, select Database. |
| Database Instance | Select the instance ID of the target database. |
| Account | Account of the target database, which must have the required permissions. |
| Password | Password of the target database account |
Setting Type | Configuration Item | Description |
Task Settings | Task Name | Set a task name that is easy to identify. |
| Running Mode | Immediate execution: The task will be started immediately after the task verification is passed. Scheduled execution: The task will be automatically started at the execution time you specify. |
Source Database Settings | Source Database Type | The source database type selected during purchase, which cannot be changed. |
| Region | The source database region selected during purchase, which cannot be changed. |
| Access Type | For a third-party cloud database, you can select Public Network generally or select VPN Access, Direct Connect, or CCN based on your actual network conditions. This scenario takes Public Network as an example. For the preparations for different access types, see Overview. Public Network: The source database can be accessed through a public IP. Self-Build on CVM: The source database is deployed on a CVM instance. For more information on CVM, see Cloud Virtual Machine Documentation. Direct Connect: The source database can be interconnected with VPCs through Direct Connect. For more information on Direct Connect, see Direct Connect Documentation. VPN Access: The source database can be interconnected with VPCs through VPN Connections. For more information on VPN Connections, see VPN Connections Documentation. Database: The source database is a TencentDB database. CCN: The source database can be interconnected with VPCs through CCN. For more information on CCN, see Cloud Connect Network Documentation. VPC: The source and target databases are both deployed in Tencent Cloud VPCs. For more information on VPC, see Virtual Private Cloud Documentation. |
| Architecture | Select the architecture of the source database. This scenario takes Cluster migration as an example. The selected architecture type cannot be modified after the connectivity test is performed; otherwise, an error will be reported. |
| Node – mongod | Enter the IP/domain name and port of the mongod node, such as 1xx.xx.55.77:6xx9. For multiple nodes, separate their IPs/domain names and ports by carriage return. |
| Node – mongos | Enter the IP/domain name and port of the mongos node. |
| Node – Config Server | Enter the IP/domain name and port of the config server |
| Authentication Required | Select whether to check the security of username and password in the source database. |
| Authentication Database | Enter the name of the database to be authenticated, that is, name of the database of the account executing the migration task, such as admin . |
| Authentication Mechanism | SCRAM-SHA-1 is supported currently |
| Account & Password Selection | If the three nodes of mongod, mongos, and config server in the source database have the same account and password, select Same account & password; otherwise, select Different accounts & passwords and enter their respective accounts and passwords. |
Target Database Settings | Target Database Type | The target database type selected during purchase, which cannot be changed. |
| Region | The target database region selected during purchase, which cannot be changed. |
| Access Type | In this scenario, select Database. |
| Database Instance | Select the instance ID of the target database. |
| Account | Account of the target database, which must have the required permissions. |
| Password | Password of the target database account |
Configuration Item | Description |
Migration Type | Select an option as needed. Full migration: The entire database will be migrated. The data to be migrated only includes the existing data of the source database. The incremental data written to the source database after the task is initiated won't be migrated. Full + incremental migration: The data to be migrated includes the existing data of the source database and the incremental data written to the source database after the task is initiated. If data needs to be written to the source database during migration and you want to smoothly migrate the data in a non-stop manner, select this option. |
Consistency Check | If Full + incremental migration is selected, you can perform a data consistency check to carefully compare the data in the source and target databases after migration and determine the cutover time. If Full check is selected, DTS will automatically trigger a data consistency check task when the migration task enters the "incremental sync" stage, in which the time lag between the target and the source databases is 0 seconds and the data gap between them is 0 MB. If Full check is not selected, you can manually trigger a check task when the task enters the incremental sync stage. For more information, see Creating Data Consistency Check Task. |
Migration Object | Entire instance: Migrate the entire database instance, including the metadata definitions of roles and users but excluding system databases such as system objects in PostgreSQL. Specify object: Migrate specified objects. |
Specify object | Select the objects to be migrated in the Source Database Object box and move them to the Selected Object box. |
Was this page helpful?