Skip to content

Commit bfee0dc

Browse files
kanchana-mongodbautarchnvillahermosa-mdb
authored
DOCSP-30862 Document excluded-by-default databases and collections (#131)
* DOCSP-30862 Document excluded-by-default databases and collections * Apply suggestions from code review Co-authored-by: Dave Rolsky <[email protected]> * DOCSP-30862 updates for feedback * Apply suggestions from code review Co-authored-by: Nick Villahermosa <[email protected]> * DOCSP-30862 updates for NV's feedback --------- Co-authored-by: Dave Rolsky <[email protected]> Co-authored-by: Nick Villahermosa <[email protected]>
1 parent 2c7e12e commit bfee0dc

File tree

1 file changed

+39
-2
lines changed

1 file changed

+39
-2
lines changed

source/mongodump.txt

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,45 @@ value overrides the read preference specified in the URI string.
302302
Data Exclusion
303303
~~~~~~~~~~~~~~
304304

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.
307344

308345
:binary:`~bin.mongodump` output:
309346

0 commit comments

Comments
 (0)