I have setup mongodb sharded cluster with following topology

  • 3x3 shards (each have 2 replica sets)
  • 1x3 config server replica cluster
  • 2 mongos routers

I want to shutdown whole cluster temporary keeping data integrity intact. I may use this setup later so I do not want to scrap whole setup.

Any suggestions would be appreciated.

1 Answer 1

  1. stop balancing - run sh.stopBalancer() from mongos

  2. shutdown mongos services - run db.shutdownServer() from mongos

  3. shutdown config mongod services - run db.shutdownServer() from config server mongod

  4. shutdown shards mongod services - run db.shutdownServer() from replica set mongod


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.