title: Why isn't mongodump and mongorestore working?
body: <p>I am doing to following to sync mongodb database between two instances as follows but it doesn't seem to work,anyone know what should I do to fix it?</p>
  <pre><code>mongodump --uri=&quot;mongodb://username1:PASSWORD1@x.y.z.w:27017&quot; --db=databaseName  --archive=&quot;mongodbdump.bson&quot;
  
  
  mongorestore --username=username2 --password=password2 --authenticationDatabase=databaseName --host=replicaset1:port1,replicaset2:port2,replicaset3:port3 --archive=mongodbdump.bson
  </code></pre>
  <p>Error:</p>
  <pre><code>0 document(s) restored successfully. 41419 document(s) failed to restore
  </code></pre>