Important
MongoDB 8.3 Release Candidates
MongoDB 8.3 binaries are currently available only as release candidates. Release candidates can be used for early testing of new features, but are not suitable for production deployments.
This version of the manual is for an upcoming release and is currently a work in progress.
Familiarize yourself with the content of this document, including thoroughly reviewing the prerequisites, prior to upgrading to MongoDB 8.3.
The following steps outline the procedure to upgrade a standalone
mongod from version 8.2 to 8.3.
If you need guidance on upgrading to 8.3, MongoDB professional services offer major version upgrade support to help ensure a smooth transition without interruption to your MongoDB application.
Upgrade Recommendations and Checklists
When upgrading, consider the following:
Upgrade Version Path
To upgrade an existing MongoDB deployment to 8.3, you must be running a 7.0 release.
To upgrade from a version earlier than the 7.0, you must successively upgrade major releases until you have upgraded to 7.0. For example, if you are running a 6.0, you must upgrade first to 8.2 before you can upgrade to 8.3.
Check Driver Compatibility
Before you upgrade MongoDB, check that you're using a MongoDB 8.3-compatible driver. Consult the driver documentation for your specific driver to verify compatibility with MongoDB 8.3.
Upgraded deployments that run on incompatible drivers might encounter unexpected or undefined behavior.
Preparedness
Before beginning your upgrade, see the Compatibility Changes in MongoDB 8.3 document to ensure that your applications and deployments are compatible with MongoDB 8.3. Resolve the incompatibilities in your deployment before starting the upgrade.
Before upgrading MongoDB, always test your application in a staging environment before deploying the upgrade to your production environment.
Downgrade Consideration
Starting in MongoDB 8.3, you can downgrade your MongoDB version to the immediately previous minor version.
MongoDB supports single-version downgrades along adjacent versions only. You cannot downgrade to a release that is multiple versions behind your current release.
For any versions, major or minor, you can upgrade or downgrade to its adjacent neighbors. For example, you can downgrade from 8.3 to 8.2 or upgrade from 7.0 to 8.0.
For all versions, major or minor, you can downgrade to the immediately previous major version. For example, from 8.3 to 8.0.
For any minor version, you can upgrade to the immediately next version. For example, from 8.2 to 8.3.
To learn more, see Downgrade 8.3 to 8.2.
Prerequisites
Feature Compatibility Version
The 8.2 instance must have featureCompatibilityVersion set
to "8.2". To check featureCompatibilityVersion, run the
following command:
db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
"featureCompatibilityVersion" : { "version" : "8.2" }
For more information, see db.adminCommand().
Consider Converting to Replica Set
Prior to upgrading, consider converting your standalone deployment to a replica set. Replica sets are the recommended deployment configuration for MongoDB.
Download 8.3 Binaries
Use a Package Manager
If you installed MongoDB from the MongoDB apt, yum, dnf, or
zypper repositories, you should upgrade to 8.3 using your package
manager.
Follow the appropriate 8.3 installation instructions for your Linux system. This requires adding a repository for the new release, then performing the actual upgrade process.
Manually
If you have not installed MongoDB using a package manager, you can manually download the MongoDB binaries from the MongoDB Download Center.
See 8.3 installation instructions for more information.
Upgrade Procedure
Enable backwards-incompatible 8.3 features
At this point, you can run the 8.3 binaries without the 8.3 features that are incompatible with 8.2.
To enable these 8.3 features, set the feature compatibility
version (FCV) to 8.3. You must also set confirm to
true if upgrading to 7.0 or later.
Tip
Enabling these backwards-incompatible features can complicate the downgrade process since you must remove any persisted backwards-incompatible features before you downgrade.
It is recommended that after upgrading, you allow your deployment to run without enabling these features for a burn-in period to ensure the likelihood of downgrade is minimal. When you are confident that the likelihood of downgrade is minimal, enable these features.
Run the setFeatureCompatibilityVersion command
against the admin database:
db.adminCommand( { setFeatureCompatibilityVersion: "8.3", confirm: true } )
Setting the confirm value to true allows the operation to
proceed. If you omit the confirm parameter or set confirm
to a value other than true, the command fails and returns a
warning about modifying the feature compatibility version. The
warning states that after you upgrade or downgrade your cluster's
FCV, you cannot downgrade the binary version without support
assistance.
This command must perform writes to an internal system collection. If for any reason the command does not complete successfully, you can safely retry the command as the operation is idempotent.
Troubleshooting
If mongod exits, MongoDB returns a code. To troubleshoot issues with your
upgrade, see Error Codes or Exit Codes and Statuses for a Self-Managed Deployment.
Additional Upgrade Procedures
To upgrade a replica set, see Upgrade a Replica Set to 8.3.
To upgrade a sharded cluster, see Upgrade a Sharded Cluster to 8.3.