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

Document how to set batchSize to 1

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Accepted
    • Priority: Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: mongorestore
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            backlog-server-tools Backlog - Server Tools Team
            Reporter:
            linda.qin Linda Qin
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated: