@@ -302,8 +302,45 @@ value overrides the read preference specified in the URI string.
302
302
Data Exclusion
303
303
~~~~~~~~~~~~~~
304
304
305
- :binary:`~bin.mongodump` excludes the content of the ``local`` database
306
- in its output.
305
+ If you specify both the :option:`--db <mongodump --db>` and the
306
+ :option:`--collection <mongodump --collection>` options, ``mongodump``
307
+ dumps the specified collection.
308
+
309
+ If you only specify the :option:`--db <mongodump --db>` option,
310
+ ``mongodump`` dumps that database with the following exclusions:
311
+
312
+ - If the value of ``--db`` is ``admin``:
313
+
314
+ - If you aren't connected to an Atlas Proxy, ``mongodump`` dumps the
315
+ database but excludes the ``system.keys`` collection.
316
+ - If you're connected to an Atlas Proxy, ``mongodump`` attempts to
317
+ dump the database but errors out.
318
+
319
+ - If the value of ``--db`` is ``config``, ``mongodump`` dumps all
320
+ collections in that database.
321
+
322
+ - If the value of ``--db`` is ``local``, ``mongodump`` dumps all
323
+ collections in that database.
324
+
325
+ - For all other databases, ``mongodump`` excludes all collections that
326
+ start with ``system.``, except for ``system.js``.
327
+
328
+ If you omit the ``--db`` option, the following exclusions apply:
329
+
330
+ - ``mongodump`` excludes the ``local`` database.
331
+ - ``mongodump`` only includes the following collections in the output
332
+ for the ``config`` database:
333
+
334
+ - ``chunks``
335
+ - ``collections``
336
+ - ``databases``
337
+ - ``settings``
338
+ - ``shards``
339
+ - ``tags``
340
+ - ``version``
341
+
342
+ - If you're connected to an Atlas Proxy, ``mongodump`` excludes the
343
+ ``admin`` database.
307
344
308
345
:binary:`~bin.mongodump` output:
309
346
0 commit comments