title: When using the Mongodump shell, how do you specify the database and collection from a replica set?
body: <p>I need to create a mongodump of a specific collection from a specific database in a replica set.  I am issuing the following command from the windows command shell:</p>
  <pre><code>mongodump --uri=&quot;mongodb://dd-domain-dev-shard-0-abcde.azure.mongodb.net:27017,dd-domain-dev-shard-1-abcde.azure.mongodb.net:27017,dd-domain-dev-shard-2-abcde.azure.mongodb.net:27017/?replicaSet=dd-domain-dev-shard-0&quot; --db=TargetDatabase_dev --collection=abcCollection
  </code></pre>
  <p>When doing so, the following error occurs:</p>
  <pre><code>error parsing command line options: illegal argument combination: cannot specify --db and --uri
  </code></pre>
  <p>How can I create an acceptable command that includes both the database and collection?  I must specify both because the replica set contains several databases, and I only want that single collection in the output file.</p>
  <p>MongoDb version: 4.2.11
  MongoDump version: r4.0.1</p>