|
|
334bcc |
.\" Man page generated from reStructuredText.
|
|
|
334bcc |
.
|
|
|
334bcc |
.TH "BSONDUMP" "1" "January 30, 2015" "3.0" "mongodb-manual"
|
|
|
334bcc |
.SH NAME
|
|
|
334bcc |
bsondump \- MongoDB BSON Utility
|
|
|
334bcc |
.
|
|
|
334bcc |
.nr rst2man-indent-level 0
|
|
|
334bcc |
.
|
|
|
334bcc |
.de1 rstReportMargin
|
|
|
334bcc |
\\$1 \\n[an-margin]
|
|
|
334bcc |
level \\n[rst2man-indent-level]
|
|
|
334bcc |
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
334bcc |
-
|
|
|
334bcc |
\\n[rst2man-indent0]
|
|
|
334bcc |
\\n[rst2man-indent1]
|
|
|
334bcc |
\\n[rst2man-indent2]
|
|
|
334bcc |
..
|
|
|
334bcc |
.de1 INDENT
|
|
|
334bcc |
.\" .rstReportMargin pre:
|
|
|
334bcc |
. RS \\$1
|
|
|
334bcc |
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
|
|
|
334bcc |
. nr rst2man-indent-level +1
|
|
|
334bcc |
.\" .rstReportMargin post:
|
|
|
334bcc |
..
|
|
|
334bcc |
.de UNINDENT
|
|
|
334bcc |
. RE
|
|
|
334bcc |
.\" indent \\n[an-margin]
|
|
|
334bcc |
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
334bcc |
.nr rst2man-indent-level -1
|
|
|
334bcc |
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
334bcc |
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
|
|
334bcc |
..
|
|
|
334bcc |
.SH SYNOPSIS
|
|
|
334bcc |
.sp
|
|
|
334bcc |
The \fBbsondump\fP converts \fIBSON\fP files into human\-readable
|
|
|
334bcc |
formats, including \fIJSON\fP\&. For example, \fBbsondump\fP is useful
|
|
|
334bcc |
for reading the output files generated by \fBmongodump\fP\&.
|
|
|
334bcc |
.sp
|
|
|
334bcc |
\fBIMPORTANT:\fP
|
|
|
334bcc |
.INDENT 0.0
|
|
|
334bcc |
.INDENT 3.5
|
|
|
334bcc |
\fBbsondump\fP is a diagnostic tool for inspecting
|
|
|
334bcc |
BSON files, not a tool for data ingestion or other application use.
|
|
|
334bcc |
.UNINDENT
|
|
|
334bcc |
.UNINDENT
|
|
|
334bcc |
.SH OPTIONS
|
|
|
334bcc |
.sp
|
|
|
334bcc |
Changed in version 3.0.0: \fBbsondump\fP removed the \fB\-\-filter\fP option.
|
|
|
334bcc |
|
|
|
334bcc |
.INDENT 0.0
|
|
|
334bcc |
.TP
|
|
|
334bcc |
.B bsondump
|
|
|
334bcc |
.UNINDENT
|
|
|
334bcc |
.INDENT 0.0
|
|
|
334bcc |
.TP
|
|
|
334bcc |
.B bsondump
|
|
|
334bcc |
.UNINDENT
|
|
|
334bcc |
.INDENT 0.0
|
|
|
334bcc |
.TP
|
|
|
334bcc |
.B \-\-help
|
|
|
334bcc |
Returns information on the options and use of \fBbsondump\fP\&.
|
|
|
334bcc |
.UNINDENT
|
|
|
334bcc |
.INDENT 0.0
|
|
|
334bcc |
.TP
|
|
|
334bcc |
.B \-\-verbose, \-v
|
|
|
334bcc |
Increases the amount of internal reporting returned on standard output
|
|
|
334bcc |
or in log files. Increase the verbosity with the \fB\-v\fP form by
|
|
|
334bcc |
including the option multiple times, (e.g. \fB\-vvvvv\fP\&.)
|
|
|
334bcc |
.UNINDENT
|
|
|
334bcc |
.INDENT 0.0
|
|
|
334bcc |
.TP
|
|
|
334bcc |
.B \-\-quiet
|
|
|
334bcc |
Runs the \fBbsondump\fP in a quiet mode that attempts to limit the amount
|
|
|
334bcc |
of output.
|
|
|
334bcc |
.sp
|
|
|
334bcc |
This option suppresses:
|
|
|
334bcc |
.INDENT 7.0
|
|
|
334bcc |
.IP \(bu 2
|
|
|
334bcc |
output from \fIdatabase commands\fP
|
|
|
334bcc |
.IP \(bu 2
|
|
|
334bcc |
replication activity
|
|
|
334bcc |
.IP \(bu 2
|
|
|
334bcc |
connection accepted events
|
|
|
334bcc |
.IP \(bu 2
|
|
|
334bcc |
connection closed events
|
|
|
334bcc |
.UNINDENT
|
|
|
334bcc |
.UNINDENT
|
|
|
334bcc |
.INDENT 0.0
|
|
|
334bcc |
.TP
|
|
|
334bcc |
.B \-\-version
|
|
|
334bcc |
Returns the \fBbsondump\fP release number.
|
|
|
334bcc |
.UNINDENT
|
|
|
334bcc |
.INDENT 0.0
|
|
|
334bcc |
.TP
|
|
|
334bcc |
.B \-\-objcheck
|
|
|
334bcc |
Validates each \fIBSON\fP object before outputting it in \fIJSON\fP
|
|
|
334bcc |
format. By default, \fBbsondump\fP enables \fI\-\-objcheck\fP\&.
|
|
|
334bcc |
For objects with a high degree of sub\-document nesting,
|
|
|
334bcc |
\fI\-\-objcheck\fP can have a small impact on performance. You can set
|
|
|
334bcc |
\fI\-\-noobjcheck\fP to disable object checking.
|
|
|
334bcc |
.sp
|
|
|
334bcc |
Changed in version 2.4: MongoDB enables \fI\-\-objcheck\fP by default, to prevent any
|
|
|
334bcc |
client from inserting malformed or invalid BSON into a MongoDB
|
|
|
334bcc |
database.
|
|
|
334bcc |
|
|
|
334bcc |
.UNINDENT
|
|
|
334bcc |
.INDENT 0.0
|
|
|
334bcc |
.TP
|
|
|
334bcc |
.B \-\-noobjcheck
|
|
|
334bcc |
New in version 2.4.
|
|
|
334bcc |
|
|
|
334bcc |
.sp
|
|
|
334bcc |
Disables the default document validation that MongoDB performs on all
|
|
|
334bcc |
incoming BSON documents.
|
|
|
334bcc |
.UNINDENT
|
|
|
334bcc |
.INDENT 0.0
|
|
|
334bcc |
.TP
|
|
|
334bcc |
.B \-\-type <=json|=debug>
|
|
|
334bcc |
Changes the operation of \fBbsondump\fP from outputting
|
|
|
334bcc |
"\fIJSON\fP" (the default) to a debugging format.
|
|
|
334bcc |
.UNINDENT
|
|
|
334bcc |
.INDENT 0.0
|
|
|
334bcc |
.TP
|
|
|
334bcc |
.B \-\-pretty
|
|
|
334bcc |
New in version 3.0.0.
|
|
|
334bcc |
|
|
|
334bcc |
.sp
|
|
|
334bcc |
Outputs documents in a pretty\-printed format JSON.
|
|
|
334bcc |
.UNINDENT
|
|
|
334bcc |
.INDENT 0.0
|
|
|
334bcc |
.TP
|
|
|
334bcc |
.B <bsonFilename>
|
|
|
334bcc |
The final argument to \fBbsondump\fP is a document containing
|
|
|
334bcc |
\fIBSON\fP\&. This data is typically generated by
|
|
|
334bcc |
\fBbsondump\fP or by MongoDB in a \fIrollback\fP operation.
|
|
|
334bcc |
.UNINDENT
|
|
|
334bcc |
.SH USE
|
|
|
334bcc |
.sp
|
|
|
334bcc |
By default, \fBbsondump\fP outputs data to standard output. To
|
|
|
334bcc |
create corresponding \fIJSON\fP files, you will need to use the
|
|
|
334bcc |
shell redirect. See the following command:
|
|
|
334bcc |
.INDENT 0.0
|
|
|
334bcc |
.INDENT 3.5
|
|
|
334bcc |
.sp
|
|
|
334bcc |
.nf
|
|
|
334bcc |
.ft C
|
|
|
334bcc |
bsondump collection.bson > collection.json
|
|
|
334bcc |
.ft P
|
|
|
334bcc |
.fi
|
|
|
334bcc |
.UNINDENT
|
|
|
334bcc |
.UNINDENT
|
|
|
334bcc |
.sp
|
|
|
334bcc |
Use the following command (at the system shell) to produce debugging
|
|
|
334bcc |
output for a \fIBSON\fP file:
|
|
|
334bcc |
.INDENT 0.0
|
|
|
334bcc |
.INDENT 3.5
|
|
|
334bcc |
.sp
|
|
|
334bcc |
.nf
|
|
|
334bcc |
.ft C
|
|
|
334bcc |
bsondump \-\-type=debug collection.bson
|
|
|
334bcc |
.ft P
|
|
|
334bcc |
.fi
|
|
|
334bcc |
.UNINDENT
|
|
|
334bcc |
.UNINDENT
|
|
|
334bcc |
.SH AUTHOR
|
|
|
334bcc |
MongoDB Documentation Project
|
|
|
334bcc |
.SH COPYRIGHT
|
|
|
334bcc |
2011-2015
|
|
|
334bcc |
.\" Generated by docutils manpage writer.
|
|
|
334bcc |
.
|