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

Unclear step in restoring a sharded cluster procedure

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      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"}})
      

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

              Created:
              Updated:
              Resolved:
              5 years, 16 weeks, 4 days ago