This topic describes how to migrate the data of a standalone instance or a replica set instance across regions by using Data Transmission Service (DTS). DTS supports both full data migration and incremental data migration. You can use these two methods together to migrate the data of an ApsaraDB for MongoDB instance across regions without interruptions to your business.
Prerequisites
- The source instance is either a standalone instance or a replica set instance. If
the source instance is a sharded cluster instance, we recommend that you use the built-in
commands of MongoDB to migrate data. For more information, see Migrate a user-created MongoDB database to ApsaraDB for MongoDB by using tools provided by MongoDB.
Note You cannot use DTS to incrementally migrate the data of a standalone instance. For more information, see Migration types.
- The destination instance is created in the destination region. For more information,
see Create a standalone instance, Create a replica set instance, or Create a sharded cluster instance.
Note The storage capacity of the destination instance must be greater than the occupied storage space of the source instance.
Background information
You may need to migrate the data of an ApsaraDB for MongoDB instance across regions if:
- You want to restructure your business.
- You want to use the ApsaraDB for MongoDB instance to provide database services for applications deployed on an ECS instance, but the two instances are in different regions.
The following procedure illustrates how to migrate data from an ApsaraDB for MongoDB instance in China (Qingdao) to an instance in China (Hangzhou).

Precautions
- We recommend that you migrate your data during off-peak hours to avoid business interruptions.
- To ensure data consistency, we recommend that you do not write data to the source instance while full data migration of a standalone instance is in progress.
- If the source and destination instances run different database versions or storage engines, ensure there are no compatibility issues between them before you start migration. For more information about the database versions and storage engines supported by ApsaraDB for MongoDB, 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. | Charged only when data is migrated from Alibaba Cloud over the Internet. For more information, see DTS pricing. |
Incremental data migration | Charged. For more information, see DTS pricing. |
Migration types
Migration type | Description |
---|---|
Full data migration | DTS migrates all historical data of the required objects from the source MongoDB database
to the destination MongoDB database.
Note The following types of objects are supported: database, collection, and index.
|
Incremental data migration | After full data migration is complete, DTS synchronizes incremental data from the
source MongoDB database to the destination MongoDB database.
Note
|
Required database account permissions
Data source | Full data migration | Incremental data migration |
---|---|---|
Source ApsaraDB for MongoDB instance | Read permissions on the source database | Read permissions on the source database, admin database, and local database |
Destination ApsaraDB for MongoDB instance | Read/write permissions on the destination database | Read/write permissions on the destination database |
Procedure
What to do next
Determine whether to release the source instance.
- If the source instance uses pay-as-you-go billing, release it. For more information, see Release an ApsaraDB for MongoDB instance.
- If the source instance uses subscription billing, you cannot release it.