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

Document how to set batchSize to 1

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: mongorestore
    • None

      When restoring to a config server without manually specifying a batchSize, an error occurs:

      bash-3.2$ mongorestore -d admin dump/admin/ -u XXX -p XXX --authenticationDatabase admin --port XXX 
      2017-01-19T15:16:11.565+1100	building a list of collections to restore from dump/admin dir
      2017-01-19T15:16:11.566+1100	restoring users from dump/admin/system.users.bson
      2017-01-19T15:16:11.605+1100	error: Writes to config servers must have batch size of 1, found 2
      2017-01-19T15:16:11.625+1100	done

      If should detect that we're restoring to a config server and set the batchSize to 1 automatically in mongorestore.

            Unassigned Unassigned
            linda.qin@mongodb.com Linda Qin
            1 Vote for this issue
            6 Start watching this issue