Import a dump of older version (v3.4.10) into a new mongo db server version 4.X or 5.X

I am migrating all databases from an old server (mongodb version v3.4.10) via mongodump to a new server with a newer version of mongodb (Two separate databases I am only migrating the data). Will the dump from the older version be compatible with the new version? and if its not, is there a procedure that I should follow?

Thanks a lot in advance!

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

It’s not officially tested / supported but it might work. The official solution would be to migrate 3.4 => 3.6 => 4.0 => 4.2 => 4.4 => 5.0 but it’s a bit tedious.

Another official solution would be to use the live migration tool from MongoDB Atlas which is able to pump the data from old clusters and import them into recent MongoDB clusters without problem. It supports up to 2.6 => 5.0 at the moment.

But like I said, it might also just work if you don’t have complex data types or weird collection / key names that respect the usual naming conventions.

Test it and let me know the result.

Cheers,
Maxime.