2013-10-04 22:58:27 +02:00
|
|
|
.\" Man page generated from reStructuredText.
|
|
|
|
.
|
|
|
|
.TH "BSONDUMP" "1" "October 03, 2013" "2.4" "mongodb-manual"
|
2011-03-17 19:56:03 +01:00
|
|
|
.SH NAME
|
2013-03-15 00:00:30 +01:00
|
|
|
bsondump \- MongoDB BSON utility
|
|
|
|
.
|
|
|
|
.nr rst2man-indent-level 0
|
|
|
|
.
|
|
|
|
.de1 rstReportMargin
|
|
|
|
\\$1 \\n[an-margin]
|
|
|
|
level \\n[rst2man-indent-level]
|
|
|
|
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
-
|
|
|
|
\\n[rst2man-indent0]
|
|
|
|
\\n[rst2man-indent1]
|
|
|
|
\\n[rst2man-indent2]
|
|
|
|
..
|
|
|
|
.de1 INDENT
|
|
|
|
.\" .rstReportMargin pre:
|
|
|
|
. RS \\$1
|
|
|
|
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
|
|
|
|
. nr rst2man-indent-level +1
|
|
|
|
.\" .rstReportMargin post:
|
|
|
|
..
|
|
|
|
.de UNINDENT
|
|
|
|
. RE
|
|
|
|
.\" indent \\n[an-margin]
|
|
|
|
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
.nr rst2man-indent-level -1
|
|
|
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
|
|
|
..
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.sp
|
2013-10-04 22:58:27 +02:00
|
|
|
The \fBbsondump\fP converts \fIBSON\fP files into human\-readable
|
|
|
|
formats, including \fIJSON\fP\&. For example, \fBbsondump\fP is useful
|
|
|
|
for reading the output files generated by \fBmongodump\fP\&.
|
|
|
|
.sp
|
|
|
|
\fBIMPORTANT:\fP
|
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
|
|
|
\fBbsondump\fP is a diagnostic tool for inspecting
|
|
|
|
BSON files, not a tool for data ingestion or other application use.
|
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
2013-03-15 00:00:30 +01:00
|
|
|
.SH OPTIONS
|
|
|
|
.INDENT 0.0
|
2011-03-17 19:56:03 +01:00
|
|
|
.TP
|
2013-03-15 00:00:30 +01:00
|
|
|
.B bsondump
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
2013-10-04 22:58:27 +02:00
|
|
|
.B bsondump
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
2013-03-15 00:00:30 +01:00
|
|
|
.B \-\-help
|
|
|
|
Returns a basic help and usage text.
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
|
|
|
.B \-\-verbose, \-v
|
|
|
|
Increases the amount of internal reporting returned on the command
|
|
|
|
line. Increase the verbosity with the \fB\-v\fP form by including
|
2013-10-04 22:58:27 +02:00
|
|
|
the option multiple times, (e.g. \fB\-vvvvv\fP\&.)
|
2013-03-15 00:00:30 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2011-03-17 19:56:03 +01:00
|
|
|
.TP
|
2011-03-17 20:37:47 +01:00
|
|
|
.B \-\-version
|
2013-10-04 22:58:27 +02:00
|
|
|
Returns the version of the \fBbsondump\fP utility.
|
2013-03-15 00:00:30 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
|
|
|
.B \-\-objcheck
|
|
|
|
Validates each \fIBSON\fP object before outputting it in
|
2013-10-04 22:58:27 +02:00
|
|
|
\fIJSON\fP format. By default, \fBbsondump\fP enables
|
|
|
|
\fI\-\-objcheck\fP\&. For objects with a high degree of
|
|
|
|
sub\-document nesting, \fI\-\-objcheck\fP can have a small impact
|
|
|
|
on performance. You can set \fI\-\-noobjcheck\fP to disable
|
2013-03-15 00:00:30 +01:00
|
|
|
object checking.
|
|
|
|
.sp
|
2013-10-04 22:58:27 +02:00
|
|
|
Changed in version 2.4: MongoDB enables \fI\-\-objcheck\fP by default, to prevent any
|
2013-03-15 00:00:30 +01:00
|
|
|
client from inserting malformed or invalid BSON into a MongoDB
|
|
|
|
database.
|
2013-10-04 22:58:27 +02:00
|
|
|
|
2013-03-15 00:00:30 +01:00
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2011-03-17 20:37:47 +01:00
|
|
|
.TP
|
2013-03-15 00:00:30 +01:00
|
|
|
.B \-\-noobjcheck
|
|
|
|
New in version 2.4.
|
2013-10-04 22:58:27 +02:00
|
|
|
|
2013-03-15 00:00:30 +01:00
|
|
|
.sp
|
2013-10-04 22:58:27 +02:00
|
|
|
Disables the default document validation that \fBbsondump\fP
|
2013-03-15 00:00:30 +01:00
|
|
|
performs on all BSON documents.
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2011-03-17 19:56:03 +01:00
|
|
|
.TP
|
2013-03-15 00:00:30 +01:00
|
|
|
.B \-\-filter \(aq<JSON>\(aq
|
2013-10-04 22:58:27 +02:00
|
|
|
Limits the documents that \fBbsondump\fP exports to only those
|
2013-03-15 00:00:30 +01:00
|
|
|
documents that match the \fIJSON document\fP specified as
|
2013-10-04 22:58:27 +02:00
|
|
|
\fB\(aq<JSON>\(aq\fP\&. Be sure to include the document in single quotes to
|
2013-03-15 00:00:30 +01:00
|
|
|
avoid interaction with your system\(aqs shell environment.
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2011-03-17 19:56:03 +01:00
|
|
|
.TP
|
2013-03-15 00:00:30 +01:00
|
|
|
.B \-\-type <=json|=debug>
|
2013-10-04 22:58:27 +02:00
|
|
|
Changes the operation of \fBbsondump\fP from outputting "\fIJSON\fP" (the
|
2013-03-15 00:00:30 +01:00
|
|
|
default) to a debugging format.
|
|
|
|
.UNINDENT
|
|
|
|
.INDENT 0.0
|
2011-03-17 19:56:03 +01:00
|
|
|
.TP
|
2013-03-15 00:00:30 +01:00
|
|
|
.B <bsonfilename>
|
2013-10-04 22:58:27 +02:00
|
|
|
The final argument to \fBbsondump\fP is a document containing
|
|
|
|
\fIBSON\fP\&. This data is typically generated by
|
2013-03-15 00:00:30 +01:00
|
|
|
\fBmongodump\fP or by MongoDB in a \fIrollback\fP operation.
|
|
|
|
.UNINDENT
|
|
|
|
.SH USAGE
|
|
|
|
.sp
|
2013-10-04 22:58:27 +02:00
|
|
|
By default, \fBbsondump\fP outputs data to standard output. To
|
2013-03-15 00:00:30 +01:00
|
|
|
create corresponding \fIJSON\fP files, you will need to use the
|
|
|
|
shell redirect. See the following command:
|
2013-10-04 22:58:27 +02:00
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
2013-03-15 00:00:30 +01:00
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ft C
|
|
|
|
bsondump collection.bson > collection.json
|
|
|
|
.ft P
|
|
|
|
.fi
|
2013-10-04 22:58:27 +02:00
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
2013-03-15 00:00:30 +01:00
|
|
|
.sp
|
|
|
|
Use the following command (at the system shell) to produce debugging
|
|
|
|
output for a \fIBSON\fP file:
|
2013-10-04 22:58:27 +02:00
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
2013-03-15 00:00:30 +01:00
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ft C
|
|
|
|
bsondump \-\-type=debug collection.bson
|
|
|
|
.ft P
|
|
|
|
.fi
|
2013-10-04 22:58:27 +02:00
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
2013-03-15 00:00:30 +01:00
|
|
|
.SH AUTHOR
|
|
|
|
MongoDB Documentation Project
|
|
|
|
.SH COPYRIGHT
|
2013-10-04 22:58:27 +02:00
|
|
|
2011-2013, MongoDB, Inc.
|
2013-03-15 00:00:30 +01:00
|
|
|
.\" Generated by docutils manpage writer.
|
|
|
|
.
|