MongoDB direct upgrade from 4.2 to 6.0 using mongodump and mongorestore


I have requirement to upgrade from mongo dB 4.2 to 6.0, since mongo is recommending using the sequential order to upgrade from 4.2 → 4.4 → 5.0 → 6.0.

I also tried direct upgrade from 4.2 to 6.0 by dumping from 4.2 and restoring to 6.0 and worked as expected.

based on the above analysis I have some questions:

  1. With recommended incremental/sequential installation, weather I supposed to uninstall the previous installed version during upgrade or I can just keep the older installations as well.?
  2. Can we go ahead with direct upgrade from 4.2 to 6.0 using dump and restore, what will be the risk in future with this direct upgrade?


Hi your post is very similar to this post, I would take a look at it, and see if you have any other questions.

Can we do a mongo 4.2 dump and then restore to mongo 6.0.3 directly

Data dump/restore format might be different from version to version. So better not rely on this.