Navigation
This is an upcoming (i.e. in progress) version of the manual.

Downgrade 4.2 to 4.0

MongoDB 4.2 is currently in development.

Warning

While the 4.2 release candidates are available, these versions of MongoDB are for testing purposes only and not for production use.

The following page summarizes various considerations for downgrading to 4.0. For specific instructions for your deployment type, see:

Downgrade Path

Once upgraded to 4.2, if you need to downgrade, we recommend downgrading to the latest patch release of 4.0 or, at least, 4.0.7 if you are running change streams and want to seamlessly resume change streams.

Considerations for Replica Sets and Sharded Clusters

Starting in MongoDB 4.2, change streams are available regardless of the "majority" read concern support; that is, read concern majority support can be either enabled (default) or disabled to use change streams.

In MongoDB 4.0 and earlier, change streams are available only if "majority" read concern support is enabled (default).

If you have disabled read concern "majority", change streams will be disabled once you downgrade to 4.0-series.

Create Backup

Optional but Recommended. Create a backup of your database.

Prequisites

To downgrade from 4.2 to 4.0, you must remove incompatible features that are persisted and/or update incompatible configuration settings. These include:

Downgrade Feature Compatibility Version (fCV)

Before downgrading the binaries, you must downgrade the featureCompatibilityVersion (fCV) to “4.0” and remove all persisted fCV 4.2 features that are incompatible with 4.0, such as:

For specific instructions to downgrade the fCV and remove these features, see:

zstd Compression

Using zstd for data compression, journal compression, or network messages requires additional considerations for downgrades.

For detailed instructions appropriate for your deployment type, see:

tls-Prefixed Configurations

Before downgrading the binaries, update tls-prefixed configuration options for ssl-prefixed aliases.

For detailed instructions appropriate for your deployment type, see:

View Definitions with $set

Before downgrading the binaries, modify read-only view definitions that include 4.2 operators, such as $set, $replaceWith, and $unset.

See:

Wildcard Indexes

Before downgrading the binaries, drop all Wildcard Indexes.

For detailed instructions appropriate for your deployment type, see: