For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

Upgrade to MongoDB Enterprise (Replica Set)

Warning

MongoDB 9.1 Not Yet Available

MongoDB 9.1 release candidates are not yet available. This version of the manual is for an upcoming release and is currently a work in progress.

MongoDB Enterprise provides various features not available in the MongoDB Community edition, such as:

The following steps outline the procedure to upgrade a replica set from the MongoDB Community Edition to the MongoDB Enterprise Edition. For example, the steps can be used to upgrade MongoDB 7.0 Community to MongoDB 7.0 Enterprise.

Warning

Do not use these instructions to upgrade to another release version.

For general guidance on MongoDB version numbering, release types, and upgrade paths, see MongoDB Versions and Upgrade Paths.

Depending on your operating system, you can install the MongoDB Enterprise binaries by using a package manager or by downloading the binaries manually.

If you have installed MongoDB Community using a package manager, follow the package manager instructions for your operating system:

During the installation, the package manager will remove the community packages; this will not affect the running deployment until you restart.

To minimize downtime, you can upgrade from MongoDB Community to Enterprise Edition using a "rolling" upgrade by upgrading the members individually while the other members are available.

1

Upgrade the secondary members of the replica set one at a time:

  1. Shut down the mongod instance.

  2. Restart with the Enterprise mongod, specifying the same configuration options (e.g. same data directory, configuration file, etc.).

Wait for the member to recover to SECONDARY state before upgrading the next secondary member.

2

Once all the secondary members have been upgraded to Enterprise, connect mongosh to the primary and use rs.stepDown() to step down the primary and force an election of a new primary.

3

When rs.status() shows that the primary has stepped down and another member has assumed PRIMARY state, upgrade the stepped-down primary:

  1. Shut down the stepped-down primary.

  2. Restart with the Enterprise mongod, specifying the same configuration options (e.g. same data directory, configuration file, etc.).

Important

Before using any Enterprise features, ensure that all members have been upgraded to Enterprise edition.