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

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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.8.0-rc2
    • Affects Version/s: None
    • Component/s: None
    • None

      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

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

              Created:
              Updated:
              Resolved: