Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-11648

Unclear step in restoring a sharded cluster procedure

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Major - P3
    • Resolution: Gone away
    • None
    • None
    • None
    • None
    • true

    Description

      In the procedure for restoring a sharded cluster step 5 states:

      "If shard hostnames have changed, update the config database.
      If shard hostnames have changed, connect a mongo shell to the mongos instance and update the shards collection in the Config Database to reflect the new hostnames."

      I believe an example will make this step clear. For example:
      Get the current configuration:

      use config
      db.shards.find()
      

      A typical output would be as follows:

      { "_id" : "shard01", "host" : "shard01/oldHost1:27018,oldHost1:27018,oldHost1:27018" }
      

      Finally, updating the document with the new hosts:

      db.shards.update({_id:"shard01"},{$set:{"host":"shard01/newHost1:27018,newHost2:27018,newHost3:27018"}})
      

      Attachments

        Issue Links

          Activity

            People

              ravind.kumar Ravind Kumar (Inactive)
              idan.sher@mongodb.com Idan Sher
              Ravind Kumar Ravind Kumar (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                3 years, 25 weeks, 3 days ago