Hi @mental_N_A,
You have multiple solutions to upgrade from MDB 3.6 to 4.4. But before you try anything BACKUP EVERYTHING and of course make sure that you can recreate a 3.6.3 node from your backup so you can always come back and try something else.
- The dump solution
mongodump
& mongorestore
can backup and restore entire databases in a MongoDB cluster. The BSON file they create might not be compatible if the gap between your MongoDB versions is too large (like 2.4 to 4.4 for example). But because 3.6 is not excessively old, it might work just fine.
The big bonus here is that you don’t have to care about recreating your indexes because they will be saved as well in the metadata & they will be rebuilt on the new cluster. And you also don’t need to update 3.6 => 4.0 => 4.2 => 4.4. You can just mongodump in 3.6 and restore in a brand new 4.4 cluster.
It’s not 100% guaranteed that it works as you might find compatibility issues but I would give it a shot.
-
mongoimport
/ mongoexport
.
This solution is similar to mongodump
/ mongorestore
but instead of using binary files (BSON), you are using plain text JSON files. It’s a lot slower than mongodump / mongorestore & you are not saving the metadata so you will have to recreate the indexes manually.
- Upgrading the
mongod
binaries.
Usually this is the path sysadmins take to avoid down times as it is possible to upgrade your MongoDB Replica Set with a rolling upgrade. This is guaranteed to work this time (unlike the 2 previous methods) but it will require to upgrade from one major version to the next.
In your case, you would have to follow these instructions in this order:
These pages include step by step instructions and contain valuable warnings to avoid surprises like:
Make sure to read these instructions ahead before planning your upgrades and making sure you don’t have anything specific in your MongoDB deployment that would prevent these steps.
EDIT: Adding some links & details about mongodump
Cheers,
Maxime.