ApsaraDB for MongoDB provides standalone instances, replica set instances, and sharded cluster instances. Standalone instances are designed to store non-core enterprise data, for example, in development and testing scenarios. Replica set instances and sharded cluster instances are more suitable for production scenarios. This topic describes how to migrate data from a standalone instance to a replica set instance or a sharded cluster instance by using Data Transmission Service (DTS).
Prerequisites
Precautions
- During full data migration, DTS uses read and write resources of the source and destination databases. This may increase the load of the database server. If you migrate a large volume of data or the server specifications cannot meet your requirements, database services may become unavailable. Before you migrate data, evaluate the impact of data migration on the performance of the source and destination databases. We recommend that you migrate data during off-peak hours.
- DTS does not support incremental data migration from a standalone instance. To ensure data consistency, do not write data to the source instance during full data migration.
- If the source and destination ApsaraDB for MongoDB instances have different versions or storage engines, make sure that the versions or storage engines are compatible. For more information, see MongoDB versions and storage engines.
- To ensures better performance and stability of the instance, the system will upgrade the minor version to the latest version by default If the minor version of your instance expires or is not included in the maintenance list and the instance is upgraded, migrated, changed, Created from a backup, Created by point-in-time, or performed Restore data to a new ApsaraDB for MongoDB instance.
Billing
Migration type | Instance configuration | Internet traffic |
---|---|---|
Full data migration | Free of charge | Free of charge |
Migration types
Full data migration: DTS migrates all historical data of the required objects from the source MongoDB database to the destination MongoDB database.
Permissions required for database accounts
Instance | Permission |
---|---|
Source ApsaraDB for MongoDB instance | The read permission on the source database |
Destination ApsaraDB for MongoDB instance | The read/write permissions on the destination database |
For more information about how to create and authorize a database account, see Use DMS to manage MongoDB users.