All Products
Search
Document Center

:Notes

Last Updated:Sep 19, 2023

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 replica set instance

The database version must match the storage engine. For more information, see MongoDB versions and storage engines.

Build replica set nodes

  • A replica set instance automatically created by ApsaraDB for MongoDB consists of a primary node, a hidden secondary node (invisible to you), and one or more secondary nodes.

  • While a replica set instance is running, you can scale the instance to 3, 5, or 7 nodes as needed. For more information, see Change the configurations of a replica set instance.

    Note

    You cannot connect to a replica set instance from a secondary node of a user-created database. If you want to synchronize data from a replica set instance to a user-created MongoDB database for data testing or analysis, you can use MongoShake. For more information, see Use MongoShake to perform one-way synchronization between ApsaraDB for MongoDB instances.

Restart a replica set instance

You must restart the instance in the ApsaraDB for MongoDB console or by calling the RestartDBInstance operation.

Migrate data from a replica set instance

Migrate a self-managed MongoDB database that uses the replica set architecture to ApsaraDB for MongoDB by using DTS or Migrate self-managed databases to Alibaba Cloud by using tools provided by MongoDB.

Back up the data of a replica set 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 or 4.2. For more information, see Upgrade the major version of an ApsaraDB for MongoDB instance. Alternatively, you can select the database version 4.0 or 4.2 when you create the instance.

Restore the data of a replica set instance

You can restore data from a point in time or a backup set. For more information, see Restore backup data to a new ApsaraDB for MongoDB instance by backup point and Restore backup data to a new ApsaraDB for MongoDB instance by point in time.

Modify parameters of a replica set instance

For security and stability, you are not allowed to modify certain parameters of a replica set instance. For more information, see Configure database parameters for an ApsaraDB for MongoDB instance.