Hi David,
With each major release of MongoDB, there are changes to metadata and configuration within the database due to new features.
By importing an older version of MongoDB database dump to a newer version of MongoDB, you may run into compatibility issues.
Recommend to review the full list of:
4.0 changes that can affect compatibility with older version of MongoDB
3.6 changes that can affect compatibility with older version of MongoDB
3.4 changes that can affect compatibility with older version of MongoDB
3.2 changes that can affect compatibility with older version of MongoDB
To upgrade your 3.0.x cluster to 3.6, the upgrade requirement is to perform upgrade on all members of the cluster from 3.0 -> 3.2.
Then repeat the same process to the next major release until the targeted major version is reached.
With each major upgrade, it is import to also consider the Driver Compatibility.
Before upgrading MongoDB, always test your application in a staging environment before deploying the upgrade to your production environment.
Additional resources:
Regards,
Lian
With each major release of MongoDB, there are changes to metadata and configuration within the database due to new features.
Hi Astro,
User-visible metadata and config changes are manual upgrade steps for replica sets and sharded clusters. For example, when upgrading from 3.4 to 3.6 the FCV (Feature Compatibility Version) setting is not automatically changed.
This is outlined as step 4 (Enable backwards-incompatible 3.6 features) of Upgrade Process in Upgrade a Replica Set to 3.6 guide.
In addition to David’s post, in-place upgrades minimise downtime and ensure compatibility by stepping through adjacent major release upgrades using tested procedures. It is possible to use mongodump & mongorestore if downtime is acceptable, but skipping one or more major releases with mongorestore may result in errors due to stricter validation in successive releases of MongoDB. For example, stricter index validation in 3.4.
Regards,
Lian