You can migrate data from a user-created MongoDB database to an ApsaraDB for MongoDB instance. Notice the limits of ApsaraDB for MongoDB.

Operation Limit
Deploy a sharded cluster instance The database version must match the storage engine. For more information, see MongoDB versions and storage engines.
Build cluster components
  • When you create a sharded cluster instance, you can specify the specifications and numbers of mongos and shards.
  • While the instance is running, you can add mongos and shards, but you cannot remove them. For more information, see Configuration change overview.
Restart a sharded cluster instance You must restart the instance in the ApsaraDB for MongoDB console or by calling the RestartDBInstance operation.
Migrate data from a sharded cluster instance

You can use the built-in commands of MongoDB or Data Transmission Service (DTS) to migrate data. For more information, see Use the built-in commands of MongoDB to migrate data of a sharded cluster instance or Use DTS to migrate data of a sharded cluster instance.

Back up the data of a sharded cluster instance Configure automatic backup for an ApsaraDB for MongoDB instance: Only physical backup is supported. Manually back up an ApsaraDB for MongoDB instance: Both physical backup and logical backup are supported.
Note If the database version of the instance is 3.2 or 3.4, the number of collections and indexes in the instance cannot exceed 10,000. Otherwise, physical backup may fail. If you want to increase this limit, we recommend that you upgrade the database version to 4.0. For more information, see Upgrade MongoDB versions. Alternatively, you can select the database version 4.0 when you create the instance.
Restore data to a sharded cluster instance You can only restore data by point in time. For more information, see Restore data to a new ApsaraDB for MongoDB instance by point in time.
Modify parameters of a sharded cluster instance For security and stability, you are not allowed to modify the parameters of a sharded cluster instance.
Data read and write You can only read data from the admin database of the sharded cluster instance, but you cannot write data to the admin database.