1
votes

Your help will be very much appreciated.

We are using mongodb , 3.2.9 version , sharded cluster on RHEL 7.2. While trying to restore the admin database via mongorestore we get the following error:

restoring users from /home/mongod/admin/system.users.bson   
error: Writes to config servers must have batch size of 1, found 11

Indeed there are 11 users in source database.
system.users collection contains 11 documents. But why would the restore fail ?.. error message is not clear to us.
Restore of other databases was successful.

Same result while trying to restore with and without authentication being enabled.

thanks in advance

1

1 Answers

0
votes

You have to use an additional parameter: --batchSize=1 in your mongorestore command.

mongorestore  --host <host utl>:<PORT> --db <db name> -u <user name> <path to your local backup> --batchSize=1

tip found here