After reading this in the official Mongo Documentation: https://docs.mongodb.com/database-tools/mongorestore/#restore-to-matching-server-version
I‘m having doubts on how the best practice is in the following case.
Our old Server has Mongo 4 installed and our new Server is Running Mongo 5. Both Stand-alone installations.
I can‘t install or Update Mongo on the old Server.
Is there a way on how i can transfer my databases without having Datacorruption or Problems like the official Documentation talks about?
I know i have to use the —gzip tag, but that‘s about it.
Thanks for helping.
It is a recommendation to use the same verdion
Mongo tools are now separate package and had its own version.
restore is compatible with mongo 4 and 5.
dump also compatible with verdion 4 and 5.
But if there are some unsupported things in mongo 5 from mongo 4 which is used in your schema and queries, you would take a dump and give a try out in your prestaging environment.
And do not forget to read about the release notes.
Apart from the mentioned versions, it also says
While mongodump may work on earlier versions of MongoDB server, any such compatibility is not guaranteed.