Downgrade MongoDB 3.4 to 3.2
Before you attempt any downgrade, familiarize yourself with the content of this document.
Once upgraded to 3.4, you cannot downgrade to a 3.2.7 or earlier version. You can only downgrade to a 3.2.8 or later version.
To downgrade, you must remove any 3.4 features incompatible with 3.2 or earlier versions as generally outlined below. These steps are necessary only if
featureCompatibilityVersion has ever been set to
For instructions specific to standalone, replica set, or sharded cluster, see:
- Downgrade 3.4 Standalone to 3.2.
- Downgrade 3.4 Replica Set to 3.2.
- Downgrade 3.4 Sharded Cluster to 3.2.
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 on the target as the operation is idempotent.
If you have defined any views, drop the views before downgrading MongoDB 3.4 to 3.2.
To find views, you can run the following in the
In each database that contains views, drop the
system.views collection to drop all views in that database.
If running with access control, you must have privileges to drop the
system.views collection for the database. See Create a Role to Drop system.views Collection across Databases.
If you have defined any non-“simple” collation for a collection or an index, remove the collection or index before downgrading MongoDB 3.4 to 3.2.
To find collections with collation specifications, you can run the following in the
You can migrate the content of the collection to a new collection without the collation specification (one way is via the aggregation pipeline stage
To find indexes with collation specification, you can run the following in the
Drop the indexes with a collation specification. After the downgrade, recreate the dropped indexes.
Convert any data of decimal type. In versions of MongoDB earlier than 3.4, operations against documents that contain decimal type may fail. For some possible conversion options, see Model Monetary Data.
To detect the presence of decimal, you can run
db.collection.validate(true) against the collections which may contain decimal data.
db.collection.validate(true) reports on decimal data only when
If you have
v: 2 indexes (i.e. the default version for indexes created in MongoDB 3.4 if
reindex the collection to recreate all indexes on the collection as
v: 1 before downgrading MongoDB.
To find indexes with
v: 2, you can run the following in the