Uploaded image for project: 'MongoDB CLI Tools'
  1. MongoDB CLI Tools
  2. TOOLS-435

mongorestore fails ungracefully by default when dump/restore on a sharded cluster

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0-rc2
    • Component/s: None
    • Labels:
      None

      Description

      General idea:

      1) create a sharded cluster, run mongodump without --db or --collection so you dump everything
      2) run mongorestore on it

      By default, mongorestore fails halfway through with a "restore error: Writes to config servers must have batch size of 1, found 6" error. You need to set `--batchSize=1`.

      FWIW, the legacy tools fail fast when attempting to do a full restore on a sharded cluster:

      2014-12-02T15:03:54.547-0500 I - shell: started program mongorestore --w 1 --drop --host 127.0.0.1:30999
      m30999| 2014-12-02T15:03:54.576-0500 I NETWORK [mongosMain] connection accepted from 127.0.0.1:57867 #11 (2 connections now open)
      sh2606| connected to: 127.0.0.1:30999
      sh2606| Cannot do a full restore on a sharded system
      m30999| 2014-12-02T15:03:54.580-0500 I NETWORK [conn11] end connection 127.0.0.1:57867 (1 connection now open)

      IMO we should duplicate this behavior

        Attachments

          Activity

            People

            • Assignee:
              kyle.erf Kyle Erf
              Reporter:
              valeri.karpov Valeri Karpov
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: