Change the Version of MongoDB
On this page
- OAuth 2.0 authentication for programmatic access to Cloud Manager is available as a Preview feature.
- The feature and the corresponding documentation might change at any time during the Preview period. To use OAuth 2.0 authentication, create a service account to use in your requests to the Cloud Manager Public API.
You can upgrade or downgrade MongoDB versions within the same Feature Compatibility Version (FCV) in Cloud Manager sharded clusters, replica sets, and standalone MongoDB instances while maximizing the availability of your deployments.
You can add custom-built versions of MongoDB for Cloud Manager to download.
If Cloud Manager doesn't manage your deployment, change the version of MongoDB manually. To learn more, see upgrade tutorials for each MongoDB release.
Considerations
Check the following documents for any considerations or compatibility issues before changing a deployment's MongoDB version:
The documentation for your driver.
Plan the version change during a predefined maintenance window.
Change the MongoDB version on a staging environment before changing a production environment. Your staging environment should mirror your production environment. This can help avoid compatibility issues that may result in downtime for your production deployment.
Follow the MongoDB release notes when performing manual upgrades of replica sets and sharded clusters.
Note
Downgrading Limitations
You cannot downgrade a MongoDB deployment:
From version 5.0 to any version before 4.4.0
From version 4.4 to any version before 4.2.6
Prerequisites
Remove Incompatible MongoDB Features when Downgrading
If the MongoDB deployment has its Feature Compatibility Version set to the same release series as its Version, you must first manually downgrade the instance's featureCompatibilityVersion.
Downgrade the Feature Compatibility Version.
To downgrade your deployment from version 7.0 to 6.0, you must contact MongoDB Support for assistance. For more information, see Downgrade 7.0 to 6.0.
Note
This sets the featureCompatibilityVersion
to 6.0
.
Import the deployment.
Import the deployment back into Cloud Manager.
Edit the deployment in Cloud Manager and select the downgraded version under the Version column.
Read the Downgrade Considerations and take appropriate action for unsupported features.
Downgrade the Feature Compatibility Version.
Downgrade the 6.0 Standalone Feature Compatibility Version to 5.0
Downgrade the 6.0 Replica Set Feature Compatibility Version to 5.0
Downgrade the 6.0 Sharded Cluster Feature Compatibility Version to 5.0
Note
This sets the featureCompatibilityVersion
to 5.0
.
Import the deployment.
Import the deployment back into Cloud Manager.
Edit the deployment in Cloud Manager and select the downgraded version under the Version column.
Downgrade the Feature Compatibility Version.
Downgrade the 5.0 Standalone Feature Compatibility Version to 4.4
Downgrade the 5.0 Replica Set Feature Compatibility Version to 4.4
Downgrade the 5.0 Sharded Cluster Feature Compatibility Version to 4.4
Note
This removes any 5.0 incompatible features and sets the
featureCompatibilityVersion
to 4.4
.
Import the deployment.
Import the deployment back into Cloud Manager.
Edit the deployment in Cloud Manager and select the downgraded version under the Version column.
Downgrade the Feature Compatibility Version.
Downgrade the 4.4 Standalone Feature Compatibility Version to 4.2
Downgrade the 4.4 Replica Set Feature Compatibility Version to 4.2
Downgrade the 4.4 Sharded Cluster Feature Compatibility Version to 4.2
Note
This removes any 4.4 incompatible features
and sets the
featureCompatibilityVersion
to 4.2
.
Import the deployment.
Import the deployment back into Cloud Manager.
Edit the deployment in Cloud Manager and select the downgraded version under the Version column.
Procedure
In MongoDB Cloud Manager, go to the Deployment page for your project.
If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.
If it's not already displayed, select your desired project from the Projects menu in the navigation bar.
If the Deployment page is not already displayed, click Deployment in the sidebar.
The Deployment page displays.
Go to the Processes page.
Click the Processes tab for your deployment.
The Processes page displays.
Verify the desired version number is in the version list.
In the Cluster Configuration section, the Cluster Settings heading lists the processes with their names, MongoDB versions, data directories and log files.
Scroll to the Cluster Settings heading.
Click the Version arrow for the first MongoDB process in the list.
(Optional) Update the featureCompatibilityVersion
.
If you are upgrading to a new major version, and wish to enable
features offered in the new major version, you must also update the
featureCompatibilityVersion
.
For each MongoDB deployment that you want to change:
Click the current
featureCompatibilityVersion
for the deployment.Click the value that matches the desired version number.