MongoDB Upgrade path from 3.2 version

Hi,
We have sharded MongoDB 3.2 cluster which was upgraded from 2.4 version about 3 year ago. Our config servers are using replica set and using wired tiger engine
We are planning to upgrade to 4.x
Is there any direct path available from 3.2 to 4.x or we have to go in multiple steps 3.2 to 3.4 to 3.6 to 4.0

Thanks
Sanjay

1 Like

Hi @Sanjay_Gupta and welcome in the MongoDB Community :muscle: !

MongoDB 3.2 is really old now. It’s not supported anymore since September 2018. It’s a good idea to update it :smiley:.

To avoid a significant downtime, the easiest way is to update from one major version to the next, without skipping one.
So 3.2 => 3.4 => 3.6 => 4.0 => 4.2 => 4.4.

Read each very carefully because they will require you to run some admin queries like db.adminCommand( { setFeatureCompatibilityVersion: "3.4" } ) at least. They might also contain some specific instructions which you might not have in others.

Another solution might be do just mongodump the entire thing and restore in on a 4.4 cluster. But there is such a gap in the versions that I’m not even sure the dump would be valide in 4.4. Might be though. But this would require a maintenance window.

If you ever get tired of this… I can’t recommend you more MongoDB Atlas which automates all this upgrade process without downtime and will take care of the minor version upgrade while you sleep :slight_smile:.

If you ever consider the MongoDB Atlas solution - there is actually an awesome trick you can pull off here!

According to the Upgrade Path of the Atlas Live Migration documentation, you can directly move from a 3.2 cluster to a 4.4 cluster in Atlas. So with this solution, you just need to spawn a new sharded cluster in Atlas and migrate to it directly from 3.2. The only required downtime is when you will have to reconfigure the clients with the new Atlas connection string during the Cut Over process.

Cheers,
Maxime.

2 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.