Get the App
SLTechnology News&Howtos  ›  Database  › 

Upgrade MongoDB to 2.6

Shulou Source: shulou.com Published: 2022-06-01 13:57:07 10月02日 Update

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/

Tags: Upgrade member instance binary copy file status auxiliary reference driver compatibility original owner and have application failure mode version program problem preparation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Linux Apple MariaDB Microsoft