Upgrade MongoDB to 2.6
Upgrade MongoDB to 2.6
Upgrade preparation
1. Connect 2. 6 mongo shell to 2. 4 replica set auxiliary members, and execute db.upgradeCheckAllDBs () in the admin library.
two。 To evaluate application compatibility issues upgraded to 2.6, refer to: http://docs.mongodb.org/manual/release-notes/2.6-compatibility/
Single instance upgrade
1. Close the mongod instance, replace it with the 2.6 mongod binaries, and restart the instance.
Replica set upgrade
1. Promote secondary members of the replica set.
Upgrade each auxiliary member in turn.
Restart the instance by shutting down the mongod instance and replacing the 2.4 binary with the 2.6mongod binary.
Check the member status through rs.status () and wait for the instance state to return to the SECONDARY state before upgrading the next secondary member.
two。 Demote the replica set master member.
Use rs.stepDown () to force the main library to fail over.
3. Upgrade the master member.
Confirm that the state of the rs.status () master library is degraded and that some members are promoted to be primary members.
Close the original master member instance, replace it with 2.6 mongod binaries, and restart the instance.
Driver upgrade
The C#/.NET driver version needs to be upgraded to 1.9 or above.
Reference:
Http://docs.mongodb.org/manual/release-notes/2.6-upgrade/
Http://docs.mongodb.org/manual/reference/method/db.upgradeCheckAllDBs/#db.upgradeCheckAllDBs
Http://docs.mongodb.org/manual/release-notes/2.6-compatibility/