Migrate MongoDB 3.4 to 5.0 ( Parallel Migration plan)

Dear Team,
My current setup is MongoDB 3.4 version with replica set ( Arbiter, Master and Slave)
I am planning to upgrade to latest version of 5.0.2.
I am using SSL certificate on database level.
Please someone advise the steps and precautions .
Note: I am planning for parallel setup not in place upgrade.
Thank you.


The best practice would be to follow a rolling upgrade schema, here you can see all the steps neccessary for an upgrade: https://www.mongodb.com/docs/manual/release-notes/5.0-upgrade-replica-set/
In your case you would need to perform incremental updates instead of jumping 3.4 → 5.0, for example:

All replica set members must be running version 4.4. To upgrade a replica set from an 4.2-series and earlier, first upgrade all members of the replica set to the latest 5.0-series release, and then follow the procedure to upgrade from MongoDB 4.4 to 5.0.

  1. Step down primary
  2. Shut down mongod
  3. Update .repo
  4. Run update (sudo yum install -y mongodb-org-<"version> mongodb-org-database-<“version”> mongodb-org-server-<“version”> mongodb-org-shell-<“version”> mongodb-org-mongos-<“version”> mongodb-org-tools-<“version”>)
  5. db.adminCommand( { setFeatureCompatibilityVersion: “<“version”>” } )
  6. On to next node, repeat steps

Thank you for the response.
I planned to go with parallel setup with backup and restore method.
MongoDB running on Windows OS.
The same steps we have to follow on Windows OS as well.

Can we restore 3.4 backup onto 5.0 directly or do I need to use intermediate 4.4 version.