-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
bsondump.txt
121 lines (68 loc) · 2.74 KB
/
bsondump.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
.. _bsondump:
============
``bsondump``
============
.. default-domain:: mongodb
.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol
.. |tool-binary| replace:: :binary:`~bin.bsondump`
.. include:: /includes/admonition-mac-osx-sierra-restriction.rst
Synopsis
--------
The :binary:`~bin.bsondump` converts :term:`BSON` files into human-readable
formats, including :term:`JSON`. For example, :binary:`~bin.bsondump` is useful
for reading the output files generated by :binary:`~bin.mongodump`.
.. important:: :binary:`~bin.bsondump` is a diagnostic tool for inspecting
BSON files, not a tool for data ingestion or other application use.
Options
-------
.. versionchanged:: 3.0.0
:binary:`~bin.bsondump` removed the ``--filter``, ``--dbpath`` and the
``--noobjcheck`` options.
.. binary:: bsondump
.. program:: bsondump
.. option:: --help
Returns information on the options and use of :program:`bsondump`.
.. option:: --verbose, -v
Increases the amount of internal reporting returned on standard output
or in log files. Increase the verbosity with the ``-v`` form by
including the option multiple times, (e.g. ``-vvvvv``.)
.. option:: --quiet
Runs the :program:`bsondump` in a quiet mode that attempts to limit the amount
of output.
This option suppresses:
- output from :term:`database commands <database command>`
- replication activity
- connection accepted events
- connection closed events
.. option:: --version
Returns the :program:`bsondump` release number.
.. option:: --objcheck
Validates each :term:`BSON` object before outputting it in :term:`JSON`
format. By default, :program:`bsondump` enables :option:`--objcheck`.
For objects with a high degree of sub-document nesting,
:option:`--objcheck` can have a small impact on performance.
.. option:: --type <=json|=debug>
Changes the operation of :program:`bsondump` from outputting
":term:`JSON`" (the default) to a debugging format.
.. option:: --pretty
.. versionadded:: 3.0.0
Outputs documents in a pretty-printed format JSON.
.. option:: <bsonFilename>
The final argument to :program:`bsondump` is a document containing
:term:`BSON`. This data is typically generated by
:program:`bsondump` or by MongoDB in a :term:`rollback` operation.
Use
---
By default, :binary:`~bin.bsondump` outputs data to standard output. To
create corresponding :term:`JSON` files, you will need to use the
shell redirect. See the following command:
.. code-block:: sh
bsondump collection.bson > collection.json
Use the following command (at the system shell) to produce debugging
output for a :term:`BSON` file:
.. code-block:: sh
bsondump --type=debug collection.bson