Migrate a MongoDB Atlas database to Alibaba Cloud through DTS

Last Updated: May 25, 2020

This topic describes how to incrementally migrate a MongoDB Atlas database to Alibaba
Cloud through Data Transmission Service (DTS). DTS supports the full migration and
incremental migration methods. You can use both methods to migrate the MongoDB Atlas
database without business interruption.

Prerequisites

The storage space of ApsaraDB for MongoDB instances must be greater than that of the
MongoDB Atlas database.

Precautions

We recommend that you migrate your data during off-peak hours to prevent negative
impacts on your business.

Data in the admin and local database is not migrated even if the admin database is
selected.

The config database is an internal database. Do not migrate this database unless otherwise
essential to your business.

For more information about the versions and storage engines supported by ApsaraDB
for MongoDB instances, see MongoDB versions and storage engines. If you want to migrate the database between different versions or engines, confirm
compatibility of these versions and engines first.

Billing

Migration type

Configuration fee

Public traffic fee

Full data migration

Free of charge.

You are charged for migrating data from the Internet to Alibaba Cloud. For more information,
see Pricing.

Note After the source database configuration is complete, you can click Test Connectivity after the Database Password field to check whether the source database configuration is correct. If the source
database configuration is correct, the Test Passed message is displayed. If the Test Failed message is displayed, click Diagnose in the Test Failed message. Modify the source database configuration as prompted.

Note After the destination database configuration is complete, you can click Test Connectivity after the Database Password field to check whether the destination database configuration is correct. If the
destination database configuration is correct, the Test Passed message is displayed. If the Test Failed message is displayed, click Diagnose in the Test Failed message. Modify the destination database configuration as prompted.

After you configure the parameters, click Set Whitelist and Next in the lower-right corner.

Note Then the IP address of the DTS server is automatically added to the whitelist of the
ApsaraDB for MongoDB instance. This ensures that the DTS server can connect to the
ApsaraDB for MongoDB instance.

Configure the migration object and migration type.

Item

Description

Migration type

If you want to migrate all data, select Full Data Migration.

If live migration is required, select both Full Data Migration and Incremental Data Migration.

Note If Incremental Data Migration is not selected, do not write data into the source database during full data migration.
This ensures data consistency between the source and destination databases.

Migration object

Select the database to be migrated from the Available list and click to move it to the Selected list.

Note Data in the admin and local database is not migrated even if the admin database is
selected.

The migration object can be a database or a collection/function.

By default, the object name will remain the same after it is migrated. If the object
you migrate has a different name in the ApsaraDB for MongoDB instance, you must use
the object name mapping feature provided by DTS. For more information, see Object name mapping.

After you configure the preceding settings, click Precheck.

Note

A pre-check must be performed before a migration task is formally started. The migration
task can be started only after a successful pre-check.

If the pre-check fails, click the icon after each check item to view the failure details. Perform the pre-check again
after you have rectified the failed items.

After the pre-check is successful, click Next.

On the Confirm Settings page, select Channel Specification and Data Transmission Service (Pay-As-You-Go) Service Terms.

Click Buy and Start to start the migration task.

Full data migration

Do not manually stop a full data migration task. Otherwise, the system may fail to
migrate the full data. Wait until the migration task ends automatically.

Incremental data migration

An incremental data migration task does not end automatically. You must manually stop
the migration task.

Note Select an appropriate time to manually stop the migration task, such as during off-peak
hours or when you are ready to switch your business to an ApsaraDB for MongoDB instance.

When Incremental Data Migration and The migration task is not delayed. are displayed in the progress bar of the migration task, stop writing data to the
source database for a few minutes. At this time, the latency time of Incremental Data Migration may be displayed in the progress bar of the migration task.

When Incremental Data Migration and The migration task is not delayed. are displayed again in the progress bar of the migration task, manually stop the
migration task.