ApsaraDB for MongoDB supports upgrading the major version of your database. Before upgrading, determine which major versions your instance can upgrade to based on its service architecture and current version, and review compatibility changes between major versions.
Supported upgrade paths
-
You can upgrade the major version of an instance directly in the ApsaraDB for MongoDB console. Available target versions depend on the instance's architecture, edition, and current version. The following tables describe the supported upgrade paths.
Architecture
Instance edition
Current major version
Available target major version
standalone architecture
General-purpose with cloud disk
MongoDB 4.0
No higher major version is available.
General-purpose with cloud disk
MongoDB 3.4
Major version upgrade is not supported.
To upgrade the major version, you can create a new instance and use it to replace the current instance.
replica set architecture
-
General-purpose with cloud disk
-
Dedicated with cloud disk
MongoDB 8.0
No higher major version is available.
MongoDB 7.0
MongoDB 8.0
MongoDB 6.0
MongoDB 7.0
MongoDB 5.0
MongoDB 6.0
MongoDB 4.4
MongoDB 5.0
After an upgrade from version 4.4 to 5.0, the default write concern changes from
{w:1}to{w:majority}. This change may cause a degradation in write performance and an increase in write latency. Before you proceed with the upgrade, make sure that you understand the impact of this change.-
General-purpose with local disk
-
Dedicated with local disk
-
Dedicated Physical Server
MongoDB 4.2
Major version upgrade is not supported.
To upgrade the major version, you can create a new instance and use it to replace the current instance.
MongoDB 4.0
MongoDB 4.2
MongoDB 3.4
-
MongoDB 4.0
-
MongoDB 4.2
MongoDB 3.2
MongoDB 3.0
sharded cluster architecture
Dedicated with cloud disk
MongoDB 8.0
No higher major version is available.
MongoDB 7.0
MongoDB 8.0
MongoDB 6.0
MongoDB 7.0
MongoDB 5.0
MongoDB 6.0
MongoDB 4.4
MongoDB 5.0
After an upgrade from version 4.4 to 5.0, the default write concern changes from
{w:1}to{w:majority}. This change may cause a degradation in write performance and an increase in write latency. Before you proceed with the upgrade, make sure that you understand the impact of this change.-
General-purpose with local disk
-
Dedicated with local disk
-
Dedicated Physical Server
MongoDB 4.2
Major version upgrade is not supported.
To upgrade the major version, you can create a new instance and use it to replace the current instance.
MongoDB 4.0
MongoDB 4.2
MongoDB 3.4
-
MongoDB 4.0
-
MongoDB 4.2
MongoDB 3.2
MongoDB 3.0
-
-
To upgrade across different architectures or storage types, first create an instance with the target major version, and then use Data Transmission Service (DTS) to migrate data from the source instance to the new instance.
The following topics describe how to migrate data:
Compatibility changes between major versions
Compatibility changes between major database versions are as follows:
The instance must be Running to upgrade its major database version. For instructions, see Upgrade database version.
Downgrading after a major version upgrade is not supported.
MongoDB 4.0 and later are compatible with MongoDB 3.6 features. To use MongoDB 3.6 features, upgrade to MongoDB 4.0 or later.
These compatibility notes cover only changes in the ApsaraDB for MongoDB kernel, not changes in instance management features.
Major database version | Compatibility changes |
MongoDB 8.3 |
For more information about MongoDB 8.3, see Compatibility Changes in MongoDB 8.3. |
MongoDB 8.0 |
For more information about MongoDB 8.0, see Compatibility Changes in MongoDB 8.0. |
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 MongoDB 4.2 compatibility update notes. |
MongoDB 4.0 |
For more information about MongoDB 4.0, see MongoDB 4.0 compatibility update notes. |
MongoDB 3.6 |
For more information about MongoDB 3.6, see MongoDB 3.6 compatibility update notes. |
MongoDB 3.4 |
For more information about MongoDB 3.4, see MongoDB 3.4 compatibility changes. |
Related APIs
Interface | Description |
Upgrades the major database version of an ApsaraDB for MongoDB instance. |