-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
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