ApsaraDB for MongoDB supports the upgrades of MongoDB major versions. ApsaraDB for MongoDB supports a variety of instance architectures and versions. Before you upgrade an instance, we recommend that you familiarize yourself with the MongoDB major versions available for upgrade and their compatibility changes.
MongoDB major versions available for upgrades
You can perform a major version upgrade in the ApsaraDB for MongoDB console. The following table lists the available MongoDB major versions and describes whether the versions are supported in different instance architectures and versions.
Architecture
Category
Current major version
Major version available for upgrade
Standalone instance
General-purpose instance that uses cloud disks
MongoDB 4.0
No new major version is available for upgrade.
General-purpose instance that uses cloud disks
MongoDB 3.4
You cannot upgrade the major version of the instance.
To upgrade the major version of an instance, you can create an instance and replace the old instance with the new instance. For information about how to create a standalone instance, see Create a standalone instance.
Replica set instance
Dedicated instance that uses cloud disks
MongoDB 7.0
No new major version is available for upgrade.
MongoDB 6.0
MongoDB 7.0
MongoDB 5.0
MongoDB 6.0
MongoDB 4.4
MongoDB 5.0
General-purpose instance that uses local disks
Dedicated instance that uses local disks
Dedicated host instance
MongoDB 4.2
You cannot upgrade the major version of the instance.
To upgrade the major version of an instance, you can create an instance and replace the old instance with the new instance. For more information about how to create a replica set instance, see Create a replica set instance.
MongoDB 4.0
MongoDB 4.2
MongoDB 3.4
MongoDB 4.0
MongoDB 4.2
MongoDB 3.2
MongoDB 3.0
Sharded cluster instance
Dedicated instance that uses cloud disks
MongoDB 7.0
No new major version is available for upgrade.
MongoDB 6.0
MongoDB 7.0
MongoDB 5.0
MongoDB 6.0
MongoDB 4.4
MongoDB 5.0
General-purpose instance that uses local disks
Dedicated instance that uses local disks
Dedicated host instance
MongoDB 4.2
You cannot upgrade the major version of the instance.
To upgrade the major version of an instance, you can create an instance and replace the old instance with the new instance. For more information about how to create a sharded cluster instance, see Create a sharded cluster instance.
MongoDB 4.0
MongoDB 4.2
MongoDB 3.4
MongoDB 4.0
MongoDB 4.2
MongoDB 3.2
MongoDB 3.0
To upgrade the major version of an instance across instance architectures or storage classes, create an instance running a major version to which you want to upgrade and then use Data Transmission Service (DTS) to migrate data from the source instance to the created instance. For more information about how to create an instance, see Create an instance.
For more information about how to migrate data, see the following topics:
Compatibility changes of MongoDB major versions
The following table describes the compatibility changes of MongoDB major versions.
When you upgrade the major version of an instance, the instance must be in the Running state. For more information about how to upgrade the major version of an instance, see Upgrade the major version of an ApsaraDB for MongoDB instance.
Major version downgrade is not supported by instances.
Instances that run MongoDB 4.0 or later support the features of MongoDB 3.6. To use the features of MongoDB 3.6, upgrade your instance to MongoDB 4.0 or later.
The compatibility changes described in this topic involve only MongoDB kernel changes. Changes to instance management features are not described.
Major engine version | Compatibility change |
MongoDB 7.0 |
For more information about MongoDB 7.0, see Compatibility Changes in MongoDB 7.0. |
MongoDB 6.0 |
For more information about MongoDB 6.0, see Compatibility Changes in MongoDB 6.0. |
MongoDB 5.0 |
For more information about MongoDB 5.0, see Compatibility Changes in MongoDB 5.0. |
MongoDB 4.4 |
For more information about MongoDB 4.4, see Compatibility Changes in MongoDB 4.4. |
MongoDB 4.2 |
For more information about MongoDB 4.2, see Compatibility Changes in MongoDB 4.2. |
MongoDB 4.0 |
For more information about MongoDB 4.0, see Compatibility Changes in MongoDB 4.0. |
MongoDB 3.6 |
For more information about MongoDB 3.6, see Compatibility Changes in MongoDB 3.6. |
MongoDB 3.4 |
For more information about MongoDB 3.4, see Compatibility Changes in MongoDB 3.4. |
Related API operations
Operation | Description |
Upgrades the major version of an ApsaraDB for MongoDB instance. |