mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
76 lines
1.7 KiB
Groff
76 lines
1.7 KiB
Groff
.TH MONGOEXPORT "1" "June 2009" "10gen" "Mongo Database"
|
|
.SH "NAME"
|
|
mongoexport \- the Mongo export tool
|
|
.SH "SYNOPSIS"
|
|
\fBmongoexport [\fIOPTIONS\fR]\fR
|
|
.SH "DESCRIPTION"
|
|
.PP
|
|
\fBmongoexport\fR
|
|
is a tool to export a MongoDB collection to either JSON or CSV. The query can be filtered or a list of fields to output can be given.
|
|
.PP
|
|
If the output is CSV, the fields must be specified in order.
|
|
.SH "EXAMPLES"
|
|
.TP
|
|
.B mongoexport -d test -c test1 --csv -f "name,num"
|
|
export documents from test.test1 in CSV format
|
|
.SH "OPTIONS"
|
|
.TP
|
|
.B \-\-help
|
|
show usage information
|
|
.TP
|
|
.B \-\-version
|
|
show version information
|
|
.TP
|
|
.B \-v, \-\-verbose
|
|
be more verbose (include multiple times for more verbosity
|
|
e.g. \-vvvvv)
|
|
.TP
|
|
.B \-h, \-\-host HOST
|
|
server to connect to (default HOST=localhost)
|
|
.TP
|
|
.B\-\-port arg
|
|
server port. Can also use \-\-host hostname:port
|
|
.TP
|
|
.B \-\-ipv6
|
|
enable IPv6 support (disabled by default)
|
|
.TP
|
|
.B \-u|\-\-username USERNAME
|
|
specify user to log in as
|
|
.TP
|
|
.B \-p|\-\-password PASSWORD
|
|
specify password of user
|
|
.TP
|
|
.B \-\-dbpath PATH
|
|
directly access mongod data files in this path, instead of connecting to a mongod instance
|
|
.TP
|
|
.B \-\-directoryperdb
|
|
if dbpath specified, each db is in a separate directory
|
|
.TP
|
|
.B \-d, \-\-db DATABASE
|
|
database to use
|
|
.TP
|
|
.B \-c, \-\-c COLLECTION
|
|
collection to use
|
|
.TP
|
|
.B \-f, \-\-fields FIELDS
|
|
comma\-separated list of field names
|
|
.TP
|
|
.B \-\-fieldFile FILE
|
|
file with fields names \- 1 per line
|
|
.TP
|
|
.B \-\-query
|
|
JSON query filter
|
|
.TP
|
|
.B \-\-csv
|
|
export to CSV instead of JSON
|
|
.TP
|
|
.B \-o, \-\-out FILE
|
|
output file, if not specified, stdout is used
|
|
.SH "COPYRIGHT"
|
|
.PP
|
|
Copyright 2007\-2011 10gen
|
|
.SH "SEE ALSO"
|
|
For more information, please refer to the MongoDB wiki, available at http://www.mongodb.org.
|
|
.SH "AUTHOR"
|
|
Kristina Chodorow
|