1
1
.. _bsondump:
2
2
3
+ ========
4
+ bsondump
5
+ ========
6
+
3
7
.. default-domain:: mongodb
4
8
5
9
.. binary:: bsondump
6
10
7
11
.. program:: bsondump
8
12
9
- ============
10
- ``bsondump``
11
- ============
12
-
13
13
.. contents:: On this page
14
14
:local:
15
15
:backlinks: none
16
16
:depth: 1
17
17
:class: singlecol
18
18
19
+ .. facet::
20
+ :name: genre
21
+ :values: reference
22
+
19
23
.. |arrow| unicode:: U+27A4
20
- .. |tool-binary| replace:: :binary:`~bin. bsondump`
24
+ .. |tool-binary| replace:: `` bsondump` `
21
25
22
26
Synopsis
23
27
--------
24
28
25
- The :binary:`~bin. bsondump` converts :term:`BSON` files into human-readable
26
- formats, including :term:`JSON`. For example, :binary:`~bin. bsondump` is useful
27
- for reading the output files generated by :binary:`~bin. mongodump`.
29
+ `` bsondump` ` converts :term:`BSON` files into human-readable
30
+ formats, including :term:`JSON`. For example, `` bsondump` ` is useful
31
+ for reading the output files generated by `` mongodump` `.
28
32
29
33
.. important::
30
34
31
- :binary:`~bin. bsondump` is a diagnostic tool for inspecting
35
+ `` bsondump` ` is a diagnostic tool for inspecting
32
36
BSON files, not a tool for data ingestion or other application use.
33
37
34
- :binary:`~bin. bsondump` uses :manual:`Extended JSON v2.0
38
+ `` bsondump` ` uses :manual:`Extended JSON v2.0
35
39
(Canonical mode) </reference/mongodb-extended-json>`
36
40
to format its data.
37
41
38
- .. include:: /includes/extracts/require-cmd-line-bsondump.rst
39
-
40
- Versioning
41
- ~~~~~~~~~~
42
-
43
- .. include:: /includes/extracts/dbtools-version-single.rst
44
-
45
- .. note:: Quick links to older documentation
46
-
47
- - :v4.2:`MongoDB 4.2 bsondump <reference/program/bsondump>`
48
- - :v4.0:`MongoDB 4.0 bsondump <reference/program/bsondump>`
49
-
50
- This documentation is for version ``{+release+}`` of |tool-binary|.
51
-
52
- Compatibility
53
- -------------
54
-
55
- MongoDB Server Compatibility
56
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57
-
58
- .. include:: /includes/extracts/dbtools-compatibility-single.rst
59
-
60
- Platform Support
61
- ~~~~~~~~~~~~~~~~
62
-
63
- |tool-binary| version ``{+release+}`` is supported on the following
64
- platforms:
65
-
66
- .. include:: /includes/fact-platform-support.rst
67
-
68
- Installation
69
- ------------
70
-
71
- .. include:: /includes/fact-see-install-guide.rst
42
+ Run ``bsondump`` from the system command line, not the
43
+ :binary:`~bin.mongo` shell.
72
44
73
45
Options
74
46
-------
75
47
76
48
.. option:: --help
77
49
78
- Returns information on the options and use of :program:`bsondump`.
79
-
50
+ Returns information on the options and use of ``bsondump``.
80
51
81
52
.. option:: --verbose, -v
82
53
83
54
Increases the amount of internal reporting returned on standard output
84
55
or in log files. Increase the verbosity with the ``-v`` form by
85
56
including the option multiple times, (e.g. ``-vvvvv``.)
86
57
87
-
88
58
.. option:: --quiet
89
59
90
- Runs :program:` bsondump` in a quiet mode that attempts to limit the amount
60
+ Runs `` bsondump` ` in a quiet mode that attempts to limit the amount
91
61
of output.
92
62
93
63
This option suppresses:
@@ -100,70 +70,56 @@ Options
100
70
101
71
- connection closed events
102
72
103
-
104
73
.. option:: --version
105
74
106
- Returns the :program:`bsondump` release number.
107
-
75
+ Returns the ``bsondump`` release number.
108
76
109
77
.. option:: --objcheck
110
78
111
- Validates each :term:`BSON` object before outputting it in :term:`JSON`
112
- format. By default, :program:` bsondump` enables :option:`--objcheck <bsondump --objcheck>`.
113
- For objects with a high degree of sub-document nesting,
114
- :option:`--objcheck <bsondump --objcheck>` can have a small impact on performance.
115
-
79
+ Validates each :term:`BSON` object before outputting it in
80
+ :term:`JSON` format. By default, `` bsondump`` enables
81
+ ``--objcheck <bsondump --objcheck>``. For objects with a high
82
+ degree of sub-document nesting, `` --objcheck <bsondump
83
+ --objcheck>`` can have a small impact on performance.
116
84
117
85
.. option:: --type=<json|debug>
118
86
119
- Changes the operation of :program:`bsondump` from outputting
120
- ":term:`JSON`" (the default) to a debugging format.
121
-
87
+ Changes the operation of ``bsondump`` from outputting
88
+ JSON (the default) to a debugging format.
122
89
123
90
.. option:: --pretty
124
91
125
92
Outputs documents in a pretty-printed format JSON.
126
93
127
-
128
94
.. option:: --bsonFile
129
95
130
- Specifies the path to a :term:` BSON` file to dump to JSON. :option:` --bsonFile` is
131
- an alternative to the positional :option:` \<bsonFilename\>` option.
96
+ Specifies the path to a BSON file to dump to JSON. `` --bsonFile` ` is
97
+ an alternative to the positional `` \<bsonFilename\>` ` option.
132
98
133
- By default, :program:`bsondump` reads from standard input.
134
-
99
+ By default, ``bsondump`` reads from standard input.
135
100
136
101
.. option:: <bsonFilename>
137
102
138
- The final argument to :program:`bsondump` is a document containing
139
- :term:`BSON`. This data is typically generated by
140
- :program:`bsondump` or by MongoDB in a :term:`rollback` operation.
141
-
103
+ The final argument to ``bsondump`` is a document containing
104
+ BSON. This data is typically generated by
105
+ ``bsondump`` or by MongoDB in a :term:`rollback` operation.
142
106
143
107
.. option:: --outFile=<file>
144
108
145
- Specifies the path of the file to which :program:` bsondump` should write
109
+ Specifies the path of the file to which `` bsondump` ` should write
146
110
its output JSON data.
147
111
148
- By default, :program:`bsondump` writes to standard output.
149
-
150
-
151
- Examples
152
- --------
153
-
154
- .. include:: /includes/extracts/require-cmd-line-bsondump.rst
155
-
156
- By default, :binary:`~bin.bsondump` outputs data to standard output. To
157
- create corresponding :term:`JSON` files, you can use the
158
- :option:`--outFile <bsondump --outFile>` option:
159
-
160
- .. code-block:: sh
112
+ By default, ``bsondump`` writes to standard output.
161
113
162
- bsondump --outFile=collection.json collection.bson
114
+ Learn More
115
+ ----------
163
116
164
- Use the following command (at the system shell) to produce debugging
165
- output for a :term:`BSON` file:
117
+ - :ref:`bsondump-compatibility-and-installation`
118
+ - :ref:`bsondump-examples`
166
119
167
- .. code-block:: sh
120
+ .. toctree::
121
+ :maxdepth: 1
122
+ :hidden:
168
123
169
- bsondump --type=debug collection.bson
124
+ Compatibility and Installation </bsondump/bsondump-compatibility-and-installation>
125
+ Examples </bsondump/bsondump-examples>
0 commit comments