Site icon Database Tutorials

MongoDB Version 3.6 Upgrade Process

Important Note :

  1. Following features are deprecated in 3.6 ‘rest = true’ and ‘httpinterface = true’ these options need to be commented in mongod.conf .
  2. Before we start upgrading  to 3.6, we need to check for feature compatibility version on primary node :
 

If above command doesn’t return value as 3.4 then we need to go ahead and set setFeatureCompatibilityVersion to 3.4 on Primary as below:

 

3. “db.upgradeCheckAllDBs()” feature is deprecated in 3.6 as the upgrade check is taken care within the binary itself and no action is required.

 

Step by Steps execution:

  1. Disable if any monitoring tool enable to avoid unnecessary  alerts while performing upgrade process.
  2. Check/Set for Feature Compatibility Version to 3.4:
    db.adminCommand( { setFeatureCompatibilityVersion: “3.4” } )
    1. Stop and Start DB services on port 27018. In case of replica set  disable replSet option along with changing port
  3.  

     Take DB backup

     

  4. Upgrade mongo binaries.

 

5.Start DB services and confirm the upgraded version:

 

Confirm, if mongo is upgraded to 3.6.2

Note: Once, step 4 is completed “db.version()” shall reflect to 3.6.2 as the upgrade check is executed within step 4 while upgrading binaries.

6.  Start DB services on initial mongodb configuration. For replicaSet server will come back in replicaSet and will start replicating from Primary

 

7. While upgrade on replicaSet, it will be performed node by node and all above steps will be performed on each DB node in replicaSet starting with Secondary server

8.When doing the upgrade on Primary, step this down to become Secondary and choose Primary from already upgraded Secondary server

 

Note :

In version 3.6, the default binding is to localhost. In this state, the node cannot communicate with the rest of the replica set nodes.
To fix this need to specify the IP address on the node explicitly using the net.bindIp option in the configuration file or alternatively
enable bind_ip_all= true

Exit mobile version