summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/bsondump.1142
-rw-r--r--debian/mongo.1727
-rw-r--r--debian/mongod.1983
-rw-r--r--debian/mongodump.1375
-rw-r--r--debian/mongoexport.1386
-rw-r--r--debian/mongofiles.1419
-rw-r--r--debian/mongoimport.1407
-rwxr-xr-xdebian/mongooplog.1346
-rwxr-xr-xdebian/mongoperf.1245
-rw-r--r--debian/mongorestore.1413
-rw-r--r--debian/mongos.1439
-rw-r--r--debian/mongosniff.1206
-rw-r--r--debian/mongostat.1520
-rwxr-xr-xdebian/mongotop.1304
14 files changed, 5385 insertions, 527 deletions
diff --git a/debian/bsondump.1 b/debian/bsondump.1
index 20464719bd0..75eda143a32 100644
--- a/debian/bsondump.1
+++ b/debian/bsondump.1
@@ -1,30 +1,128 @@
-.TH BSONDUMP "1" "March 2011" "10gen" "MongoDB Database"
+.TH "BSONDUMP" "1" "March 14, 2013" "2.2.3" "mongodb-manual"
.SH NAME
-bsondump \- print BSON documents as JSON
-.SH DESCRIPTION
-usage: bsondump [options] <bson filename>
-options:
+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
+..
+.\" Man page generated from reStructuredText.
+.
+.SH SYNOPSIS
+.sp
+The \fI\%bsondump\fP converts \fIBSON\fP files into human\-readable
+formats, including \fIJSON\fP. For example, \fI\%bsondump\fP is useful
+for reading the output files generated by \fBmongodump\fP.
+.SH OPTIONS
+.INDENT 0.0
.TP
-\fB\-\-help\fR
-produce help message
+.B bsondump
+.UNINDENT
+.INDENT 0.0
+.TP
+.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
+the option multiple times, (e.g. \fB\-vvvvv\fP.)
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-version
-show version information
+Returns the version of the \fI\%bsondump\fP utility.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-objcheck
+Validates each \fIBSON\fP object before outputting it in
+\fIJSON\fP format. By default, \fI\%bsondump\fP enables
+\fI\%--objcheck\fP by default. 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
+object checking.
+.sp
+Changed in version 2.4: MongoDB enables \fI\%--objcheck\fP by default, to prevent any
+client from inserting malformed or invalid BSON into a MongoDB
+database.
+.UNINDENT
+.INDENT 0.0
.TP
-\fB\-v\fR [ \fB\-\-verbose\fR ]
-be more verbose (include multiple times for more
-verbosity e.g. \fB\-vvvvv\fR)
+.B \-\-noobjcheck
+New in version 2.4.
+.sp
+Disables the default document validation that \fI\%bsondump\fP
+performs on all BSON documents.
+.UNINDENT
+.INDENT 0.0
.TP
-\fB\-\-objcheck\fR
-validate object before inserting
+.B \-\-filter \(aq<JSON>\(aq
+Limits the documents that \fI\%bsondump\fP exports to only those
+documents that match the \fIJSON document\fP specified as
+\fB\(aq<JSON>\(aq\fP. Be sure to include the document in single quotes to
+avoid interaction with your system\(aqs shell environment.
+.UNINDENT
+.INDENT 0.0
.TP
-\fB\-\-filter\fR arg
-filter to apply before inserting
+.B \-\-type <=json|=debug>
+Changes the operation of \fI\%bsondump\fP from outputting "\fIJSON\fP" (the
+default) to a debugging format.
+.UNINDENT
+.INDENT 0.0
.TP
-\fB\-\-type\fR arg (=json)
-type of output: json,debug
-.SH "COPYRIGHT"
-.PP
-Copyright 2011 10gen
-.SH "SEE ALSO"
-For more information, please refer to the bsondump page in the MongoDB manual, available at http://dochub.mongodb.org/core/bsondumpmanpage
+.B <bsonfilename>
+The final argument to \fI\%bsondump\fP is a document containing
+\fIBSON\fP. This data is typically generated by
+\fBmongodump\fP or by MongoDB in a \fIrollback\fP operation.
+.UNINDENT
+.SH USAGE
+.sp
+By default, \fI\%bsondump\fP outputs data to standard output. To
+create corresponding \fIJSON\fP files, you will need to use the
+shell redirect. See the following command:
+.sp
+.nf
+.ft C
+bsondump collection.bson > collection.json
+.ft P
+.fi
+.sp
+Use the following command (at the system shell) to produce debugging
+output for a \fIBSON\fP file:
+.sp
+.nf
+.ft C
+bsondump \-\-type=debug collection.bson
+.ft P
+.fi
+.SH AUTHOR
+MongoDB Documentation Project
+.SH COPYRIGHT
+2011-2013, 10gen, Inc.
+.\" Generated by docutils manpage writer.
+.
diff --git a/debian/mongo.1 b/debian/mongo.1
index 04f35a5afe7..7ff976330a5 100644
--- a/debian/mongo.1
+++ b/debian/mongo.1
@@ -1,76 +1,681 @@
-.TH MONGO "1" "June 2009" "10gen" "Mongo Database"
-.SH "NAME"
-mongo \- the Mongo command\-line tool
-.SH "SYNOPSIS"
-\fBmongo [\fIOPTIONS\fR] [\fIDB_ADDRESS\fR] [\fIFILE+\fR]\fR
-.SH "DESCRIPTION"
-.PP
-\fBmongo\fR
-is a JavaScript shell (with GNU
-readline
-capabilities). It supports interactive and non\-interactive use. When used interactively, JavaScript can be used to query the database or perform any other function normally available with SpiderMonkey. Database output is displayed in JSON format.
-.PP
-If JavaScript files are specified on the command line, the shell will run non\-interactively, running each one in sequence and then exiting.
-.SH "EXAMPLES"
-.TP
-.B mongo
-start the shell, connecting to the server at localhost:27017 and using the test database
-.TP
-.B mongo foo
-start the shell using the foo database at localhost:27017
-.TP
-.B mongo 192.169.0.5/foo
-start the shell using the foo database at 192.169.0.5:27017
-.TP
-.B mongo 192.169.0.5:9999/foo
-start the shell using the foo database at 192.169.0.5:9999
-.TP
-.B mongo script1.js script2.js script3.js
-run three scripts and exit
-.SH "OPTIONS"
+.TH "MONGO" "1" "March 14, 2013" "2.2.3" "mongodb-manual"
+.SH NAME
+mongo \- MongoDB Shell
+.
+.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
+..
+.\" Man page generated from reStructuredText.
+.
+.SH DESCRIPTION
+.sp
+\fI\%mongo\fP is an interactive JavaScript shell interface to
+MongoDB, which provides a powerful interface for systems
+administrators as well as a way for developers to test queries and
+operations directly with the database. \fI\%mongo\fP also provides
+a fully functional JavaScript environment for use with a MongoDB. This
+document addresses the basic invocation of the \fI\%mongo\fP shell
+and an overview of its usage.
+.SH SYNOPSIS
+.INDENT 0.0
+.TP
+.B mongo [\-\-shell] [\-\-nodb] [\-\-norc] [\-\-quiet] [\-\-port <port>] [\-\-host <host>] [\-\-eval <JavaScript>] [\-u <username>] [\-\-username <username>] [\-p <password>] [\-\-password <password>] [\-\-help] [\-h] [\-\-version] [\-\-verbose] [\-\-ipv6] [database] [file.js]
+.UNINDENT
+.SH INTERFACE
+.SS Options
+.INDENT 0.0
.TP
.B \-\-shell
-run the shell after executing files
+Enables the shell interface after evaluating a \fIJavaScript\fP file.
+If you invoke the \fI\%mongo\fP command and specify a JavaScript
+file as an argument, or use \fI\%--eval\fP to specify
+JavaScript on the command line, the \fI\%--shell\fP option
+provides the user with a shell prompt after the file finishes
+executing.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-help
-show usage information
+.B \-\-nodb
+Prevents the shell from connecting to any database instances. Later,
+to connect to a database within the shell, see
+\fImongo\-shell\-new\-connections\fP.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-host HOST
-server to connect to (default HOST=localhost)
+.B \-\-norc
+Prevents the shell from sourcing and evaluating
+\fB~/.mongorc.js\fP on start up.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-port PORT
-port to connect to (default PORT=27017)
+.B \-\-quiet
+Silences output from the shell during the connection process.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-nodb
-do not connect to mongod
+.B \-\-port <port>
+Specifies the port where the \fBmongod\fP or \fBmongos\fP
+instance is listening. Unless specified \fI\%mongo\fP connects
+to \fBmongod\fP instances on port \fB27017\fP, which is the default
+\fBmongod\fP port.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-eval SCRIPT
-evaluate JavaScript
+.B \-\-host <hostname>
+specifies the host where the \fBmongod\fP or \fBmongos\fP is running to
+connect to as \fB<hostname>\fP. By default \fI\%mongo\fP will attempt
+to connect to a MongoDB process running on the localhost.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-shell
-run the shell after executing files
+.B \-\-eval <javascript>
+Evaluates a JavaScript expression specified as an argument to this
+option. \fI\%mongo\fP does not load its own environment when evaluating
+code: as a result many options of the shell environment are not
+available.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-quiet
-be less chatty
+.B \-\-username <username>, \-u <username>
+Specifies a username to authenticate to the MongoDB instance.
+Use in conjunction with the
+\fI\%--password\fP option to supply a password.
+If you specify a username and password but the default database
+or the specified database do not require authentication,
+\fI\%mongo\fP will exit with an exception.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-password <password>, \-p <password>
+Specifies a password to authenticate to the MongoDB instance.
+Use in conjunction with the
+\fI\%--username\fP option to supply a username. If you
+specify a \fI\%--username\fP without the
+\fI\%--password\fP option, \fI\%mongo\fP will prompt for a
+password interactively, if the \fBmongod\fP or
+\fBmongos\fP requires authentication.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-authenticationDatabase <dbname>
+New in version 2.4.
+.sp
+Specifies the database that holds the user\(aqs (e.g
+\fI\%--username\fP) credentials.
+.sp
+By default, \fI\%mongo\fP assumes that the database name specified
+in the \fI\%db address\fP holds the user\(aqs
+credentials, unless you specify \fI\%--authenticationDatabase\fP.
+.sp
+See \fBuserSource\fP,
+\fB/reference/privilege\-documents\fP and
+\fB/reference/user\-privileges\fP for more information about
+delegated authentication in MongoDB.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-authenticationMechanism <name>
+New in version 2.4.
+.sp
+Specifies the authentication mechanism. By default, the
+authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB
+challenge/response authentication mechanism. In the MongoDB Subscriber Edition,
+\fI\%mongo\fP also includes support for \fBGSSAPI\fP to handle
+Kerberos authentication.
+.sp
+See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP
+for more information about Kerberos authentication.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-ssl
+Enable connection to a \fBmongod\fP or
+\fBmongos\fP that has SSL encryption.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-sslPEMKeyFile <filename>
+New in version 2.4.
+.IP Note
+The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support
+for SSL. To use SSL you can either compile MongoDB with SSL
+support or use the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for
+more information about SSL and MongoDB.
+.RE
+.sp
+Specifies the \fB.pem\fP file that contains both the SSL
+certificate and key. Specify the file name of the \fB.pem\fP
+file using relative or absolute paths
+.sp
+Required when using the \fI\%--ssl\fP option if the
+\fBmongod\fP or \fBmongos\fP has \fBsslCAFile\fP
+enabled \fIwithout\fP \fBsslWeakCertificateValidation\fP.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-sslPEMKeyPassword <value>
+New in version 2.4.
+.IP Note
+The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support
+for SSL. To use SSL you can either compile MongoDB with SSL
+support or use the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for
+more information about SSL and MongoDB.
+.RE
+.sp
+Specifies the password to decrypt the root certificate chain
+specified by \fI\%--sslPEMKeyFile\fP.
+.sp
+Only required if the certificate\-key file is encrypted.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-sslCAFile <filename>
+New in version 2.4.
+.IP Note
+The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support
+for SSL. To use SSL you can either compile MongoDB with SSL
+support or use the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for
+more information about SSL and MongoDB.
+.RE
+.sp
+Specifies the \fB.pem\fP file that contains the certificate from
+the Certificate Authority. Specify the file name of the \fB.pem\fP
+file using relative or absolute paths
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-help, \-h
+Returns a basic help and usage text.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-version
-show version information
+Returns the version of the shell.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-verbose
-increase verbosity
+Increases the verbosity of the output of the shell during the
+connection process.
+.UNINDENT
+.INDENT 0.0
.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
-.SH "COPYRIGHT"
-.PP
-Copyright 2007\-2011 10gen
-.SH "SEE ALSO"
-For more information, please refer to the mongo page in the MongoDB manual, available at http://dochub.mongodb.org/core/mongomanpage
-.SH "AUTHOR"
-Kristina Chodorow
+Enables IPv6 support that allows \fI\%mongo\fP to connect
+to the MongoDB instance using an IPv6 network. All MongoDB programs
+and processes, including \fI\%mongo\fP, disable IPv6
+support by default.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B <db address>
+Specifies the "database address" of the database to connect to. For
+example:
+.sp
+.nf
+.ft C
+mongo admin
+.ft P
+.fi
+.sp
+The above command will connect the \fI\%mongo\fP shell to the
+\fIadmin database\fP on the local machine. You may specify a
+remote database instance, with the resolvable hostname or IP
+address. Separate the database name from the hostname using a
+\fB/\fP character. See the following examples:
+.sp
+.nf
+.ft C
+mongo mongodb1.example.net
+mongo mongodb1/admin
+mongo 10.8.8.10/test
+.ft P
+.fi
+.UNINDENT
+.INDENT 0.0
+.TP
+.B <file.js>
+Specifies a JavaScript file to run and then exit.
+Must be the last option specified.
+Use the
+\fI\%--shell\fP option to return to a shell after the file
+finishes running.
+.UNINDENT
+.SS Files
+.sp
+\fB~/.dbshell\fP
+.INDENT 0.0
+.INDENT 3.5
+\fI\%mongo\fP maintains a history of commands in the \fB.dbshell\fP
+file.
+.IP Note
+\fI\%mongo\fP does not recorded interaction related to
+authentication in the history file, including
+\fBauthenticate\fP and \fBdb.addUser()\fP.
+.RE
+.IP Warning
+Versions of Windows \fBmongo.exe\fP earlier than 2.2.0 will
+save the \fI.dbshell\fP file in the \fBmongo.exe\fP working
+directory.
+.RE
+.UNINDENT
+.UNINDENT
+.sp
+\fB~/.mongorc.js\fP
+.INDENT 0.0
+.INDENT 3.5
+\fI\%mongo\fP will read the \fB.mongorc.js\fP file from the home
+directory of the user invoking \fI\%mongo\fP. In the file, users
+can define variables, customize the \fI\%mongo\fP shell prompt,
+or update information that they would like updated every time they
+launch a shell. If you use the shell to evaluate a JavaScript file
+or expression either on the command line with \fI\%--eval\fP or
+by specifying \fI\%a .js file to mongo\fP,
+\fI\%mongo\fP will read the \fB.mongorc.js\fP file \fIafter\fP the
+JavaScript has finished processing.
+.sp
+Specify the \fI\%--norc\fP option to disable
+reading \fB.mongorc.js\fP.
+.UNINDENT
+.UNINDENT
+.sp
+\fB/tmp/mongo_edit\fI<time_t>\fP.js\fP
+.INDENT 0.0
+.INDENT 3.5
+Created by \fI\%mongo\fP when editing a file. If the file
+exists \fI\%mongo\fP will append an integer from \fB1\fP to \fB10\fP to the
+time value to attempt to create a unique file.
+.UNINDENT
+.UNINDENT
+.sp
+\fB%TEMP%mongo_edit\fI<time_t>\fP.js\fP
+.INDENT 0.0
+.INDENT 3.5
+Created by \fBmongo.exe\fP on Windows when editing a file.
+If the file
+exists \fI\%mongo\fP will append an integer from \fB1\fP to \fB10\fP to
+the time value to attempt to create a unique file.
+.UNINDENT
+.UNINDENT
+.SS Environment
+.INDENT 0.0
+.TP
+.B EDITOR
+Specifies the path to an editor to use with the \fBedit\fP shell
+command. A JavaScript variable \fBEDITOR\fP will override the value of
+\fI\%EDITOR\fP.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B HOME
+Specifies the path to the home directory where \fI\%mongo\fP will
+read the \fB.mongorc.js\fP file and write the \fB.dbshell\fP
+file.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B HOMEDRIVE
+On Windows systems, \fI\%HOMEDRIVE\fP specifies the path the
+directory where \fI\%mongo\fP will read the \fB.mongorc.js\fP
+file and write the \fB.dbshell\fP file.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B HOMEPATH
+Specifies the Windows path to the home directory where
+\fI\%mongo\fP will read the \fB.mongorc.js\fP file and write
+the \fB.dbshell\fP file.
+.UNINDENT
+.SH KEYBOARD SHORTCUTS
+.sp
+The \fI\%mongo\fP shell supports the following keyboard shortcuts:
+[1]
+.TS
+center;
+|l|l|.
+_
+T{
+\fBKeybinding\fP
+T} T{
+\fBFunction\fP
+T}
+_
+T{
+Up arrow
+T} T{
+Retrieve previous command from history
+T}
+_
+T{
+Down\-arrow
+T} T{
+Retrieve next command from history
+T}
+_
+T{
+Home
+T} T{
+Go to beginning of the line
+T}
+_
+T{
+End
+T} T{
+Go to end of the line
+T}
+_
+T{
+Tab
+T} T{
+Autocomplete method/command
+T}
+_
+T{
+Left\-arrow
+T} T{
+Go backward one character
+T}
+_
+T{
+Right\-arrow
+T} T{
+Go forward one character
+T}
+_
+T{
+Ctrl\-left\-arrow
+T} T{
+Go backward one word
+T}
+_
+T{
+Ctrl\-right\-arrow
+T} T{
+Go forward one word
+T}
+_
+T{
+Meta\-left\-arrow
+T} T{
+Go backward one word
+T}
+_
+T{
+Meta\-right\-arrow
+T} T{
+Go forward one word
+T}
+_
+T{
+Ctrl\-A
+T} T{
+Go to the beginning of the line
+T}
+_
+T{
+Ctrl\-B
+T} T{
+Go backward one character
+T}
+_
+T{
+Ctrl\-C
+T} T{
+Exit the \fI\%mongo\fP shell
+T}
+_
+T{
+Ctrl\-D
+T} T{
+Delete a char (or exit the \fI\%mongo\fP shell)
+T}
+_
+T{
+Ctrl\-E
+T} T{
+Go to the end of the line
+T}
+_
+T{
+Ctrl\-F
+T} T{
+Go forward one character
+T}
+_
+T{
+Ctrl\-G
+T} T{
+Abort
+T}
+_
+T{
+Ctrl\-J
+T} T{
+Accept/evaluate the line
+T}
+_
+T{
+Ctrl\-K
+T} T{
+Kill/erase the line
+T}
+_
+T{
+Ctrl\-L or type \fBcls\fP
+T} T{
+Clear the screen
+T}
+_
+T{
+Ctrl\-M
+T} T{
+Accept/evaluate the line
+T}
+_
+T{
+Ctrl\-N
+T} T{
+Retrieve next command from history
+T}
+_
+T{
+Ctrl\-P
+T} T{
+Retrieve previous command from history
+T}
+_
+T{
+Ctrl\-R
+T} T{
+Reverse\-search command history
+T}
+_
+T{
+Ctrl\-S
+T} T{
+Forward\-search command history
+T}
+_
+T{
+Ctrl\-T
+T} T{
+Transpose characters
+T}
+_
+T{
+Ctrl\-U
+T} T{
+Perform Unix line\-discard
+T}
+_
+T{
+Ctrl\-W
+T} T{
+Perform Unix word\-rubout
+T}
+_
+T{
+Ctrl\-Y
+T} T{
+Yank
+T}
+_
+T{
+Ctrl\-Z
+T} T{
+Suspend (job control works in linux)
+T}
+_
+T{
+Ctrl\-H
+T} T{
+Backward\-delete a character
+T}
+_
+T{
+Ctrl\-I
+T} T{
+Complete, same as Tab
+T}
+_
+T{
+Meta\-B
+T} T{
+Go backward one word
+T}
+_
+T{
+Meta\-C
+T} T{
+Capitalize word
+T}
+_
+T{
+Meta\-D
+T} T{
+Kill word
+T}
+_
+T{
+Meta\-F
+T} T{
+Go forward one word
+T}
+_
+T{
+Meta\-L
+T} T{
+Change word to lowercase
+T}
+_
+T{
+Meta\-U
+T} T{
+Change word to uppercase
+T}
+_
+T{
+Meta\-Y
+T} T{
+Yank\-pop
+T}
+_
+T{
+Meta\-Backspace
+T} T{
+Backward\-kill word
+T}
+_
+T{
+Meta\-<
+T} T{
+Retrieve the first command in command history
+T}
+_
+T{
+Meta\->
+T} T{
+Retrieve the last command in command history
+T}
+_
+.TE
+.IP [1] 5
+MongoDB accommodates multiple keybinding,
+Since 2.0, \fI\%mongo\fP includes support for basic emacs
+keybindings.
+.SH USE
+.sp
+Typically users invoke the shell with the \fI\%mongo\fP command at
+the system prompt. Consider the following examples for other
+scenarios.
+.sp
+To connect to a database on a remote host using authentication and a
+non\-standard port, use the following form:
+.sp
+.nf
+.ft C
+mongo \-\-username <user> \-\-password <pass> \-\-hostname <host> \-\-port 28015
+.ft P
+.fi
+.sp
+Alternatively, consider the following short form:
+.sp
+.nf
+.ft C
+mongo \-u <user> \-p <pass> \-\-host <host> \-\-port 28015
+.ft P
+.fi
+.sp
+Replace \fB<user>\fP, \fB<pass>\fP, and \fB<host>\fP with the appropriate
+values for your situation and substitute or omit the \fI\%--port\fP
+as needed.
+.sp
+To execute a JavaScript file without evaluating the \fB~/.mongorc.js\fP
+file before starting a shell session, use the following form:
+.sp
+.nf
+.ft C
+mongo \-\-shell \-\-norc alternate\-environment.js
+.ft P
+.fi
+.sp
+To print return a query as \fIJSON\fP, from the system prompt using
+the \fI\%--eval\fP option, use the following form:
+.sp
+.nf
+.ft C
+mongo \-\-eval \(aqdb.collection.find().forEach(printjson)\(aq
+.ft P
+.fi
+.sp
+Use single quotes (e.g. \fB\(aq\fP) to enclose the JavaScript, as well as
+the additional JavaScript required to generate this output.
+.SH AUTHOR
+MongoDB Documentation Project
+.SH COPYRIGHT
+2011-2013, 10gen, Inc.
+.\" Generated by docutils manpage writer.
+.
diff --git a/debian/mongod.1 b/debian/mongod.1
index a4563b7c739..fc9569149f3 100644
--- a/debian/mongod.1
+++ b/debian/mongod.1
@@ -1,16 +1,967 @@
-.\" Documentation for the MongoDB shell
-.TH MONGOD "1" "June 2009" "10gen" "Mongo Database"
-.SH "NAME"
-mongod \- the Mongo Daemon
-.SH "SYNOPSIS"
-.SH "DESCRIPTION"
-.PP
-\fBmongod\fR
-is a core MongoDB daemon. You are not supposed to call it directly, please refer to the manual if necessary.
-.SH "COPYRIGHT"
-.PP
-Copyright 2007\-2009 10gen
-.SH "SEE ALSO"
-For more information, please refer to the mongod page in the MongoDB manual, available at http://dochub.mongodb.org/core/mongodmanpage
-.SH "AUTHOR"
-Antonin Kral
+.TH "MONGOD" "1" "March 14, 2013" "2.2.3" "mongodb-manual"
+.SH NAME
+mongod \- MongoDB Server
+.
+.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
+..
+.\" Man page generated from reStructuredText.
+.
+.SH SYNOPSIS
+.sp
+\fI\%mongod\fP is the primary daemon process for the MongoDB
+system. It handles data requests, manages data format, and performs
+background management operations.
+.sp
+This document provides a complete overview of all command line options
+for \fI\%mongod\fP. These options are primarily useful for testing
+purposes. In common operation, use the \fBconfiguration file
+options\fP to control the behavior of
+your database, which is fully capable of all operations described
+below.
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B mongod
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-help, \-h
+Returns a basic help and usage text.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-version
+Returns the version of the \fI\%mongod\fP daemon.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-config <filename>, \-f <filename>
+Specifies a configuration file, that you can use to specify
+runtime\-configurations. While the options are equivalent and
+accessible via the other command line arguments, the configuration
+file is the preferred method for runtime configuration of
+mongod. See the "\fB/reference/configuration\-options\fP" document
+for more information about these options.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-verbose, \-v
+Increases the amount of internal reporting returned on standard
+output or in the log file specified by \fI\%--logpath\fP. Use the
+\fB\-v\fP form to control the level of verbosity by including the
+option multiple times, (e.g. \fB\-vvvvv\fP.)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-quiet
+Runs the \fI\%mongod\fP instance in a quiet mode that attempts to limit
+the amount of output. This option suppresses:
+.INDENT 7.0
+.IP \(bu 2
+output from \fIdatabase commands\fP,
+including \fBdrop\fP, \fBdropIndexes\fP,
+\fBdiagLogging\fP, \fBvalidate\fP, and
+\fBclean\fP.
+.IP \(bu 2
+replication activity.
+.IP \(bu 2
+connection accepted events.
+.IP \(bu 2
+connection closed events.
+.UNINDENT
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-port <port>
+Specifies a TCP port for the \fI\%mongod\fP to listen for client
+connections. By default \fI\%mongod\fP listens for connections on
+port 27017.
+.sp
+UNIX\-like systems require root privileges to use ports with numbers
+lower than 1024.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-bind_ip <ip address>
+The IP address that the \fI\%mongod\fP process will bind to and
+listen for connections. By default \fI\%mongod\fP listens for
+connections on the localhost (i.e. \fB127.0.0.1\fP address.) You may
+attach \fI\%mongod\fP to any interface; however, if you attach
+\fI\%mongod\fP to a publicly accessible interface ensure that
+you have implemented proper authentication and/or firewall
+restrictions to protect the integrity of your database.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-maxConns <number>
+Specifies the maximum number of simultaneous connections that
+\fI\%mongod\fP will accept. This setting will have no effect if
+it is higher than your operating system\(aqs configured maximum
+connection tracking threshold.
+.IP Note
+You cannot set \fBmaxConns\fP to a value higher
+than \fI20000\fP.
+.RE
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-objcheck
+Forces the \fI\%mongod\fP to validate all requests from clients
+upon receipt to ensure that clients never insert invalid documents
+into the database. 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 object
+checking at run\-time.
+.sp
+Changed in version 2.4: MongoDB enables \fI\%--objcheck\fP by default, to prevent any
+client from inserting malformed or invalid BSON into a MongoDB
+database.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-noobjcheck
+New in version 2.4.
+.sp
+Disables the default document validation that MongoDB performs on all
+incoming BSON documents.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-logpath <path>
+Specify a path for the log file that will hold all diagnostic
+logging information.
+.sp
+Unless specified, \fI\%mongod\fP will output all log information
+to the standard output. Additionally, unless you also specify
+\fI\%--logappend\fP, the logfile will be overwritten when the
+process restarts.
+.IP Note
+The behavior of the logging system may change in the near
+future in response to the \fI\%SERVER-4499\fP case.
+.RE
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-logappend
+When specified, this option ensures that \fI\%mongod\fP appends
+new entries to the end of the logfile rather than overwriting the
+content of the log when the process restarts.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-syslog
+New in version 2.1.0.
+.sp
+Sends all logging output to the host\(aqs \fIsyslog\fP system rather
+than to standard output or a log file as with \fI\%--logpath\fP.
+.IP Warning
+You cannot use \fI\%--syslog\fP with \fI\%--logpath\fP.
+.RE
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-pidfilepath <path>
+Specify a file location to hold the "\fIPID\fP" or process ID of
+the \fI\%mongod\fP process. Useful for tracking the
+\fI\%mongod\fP process in combination with the \fI\%mongod --fork\fP
+option.
+.sp
+Without a specified \fI\%--pidfilepath\fP option,
+\fBmongos\fP creates no PID file.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-keyFile <file>
+Specify the path to a key file to store authentication
+information. This option is only useful for the connection between
+replica set members.
+.IP "See also"
+.sp
+"\fIReplica Set Security\fP"
+and "\fB/administration/replica\-sets\fP."
+.RE
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-nounixsocket
+Disables listening on the UNIX socket. Unless set to false,
+\fI\%mongod\fP and \fBmongos\fP provide a UNIX\-socket.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-unixSocketPrefix <path>
+Specifies a path for the UNIX socket. Unless this option has a
+value, \fI\%mongod\fP and \fBmongos\fP, create a socket
+with the \fB/tmp\fP as a prefix.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-fork
+Enables a \fIdaemon\fP mode for \fI\%mongod\fP that runs the
+process to the background. This is the normal mode of operation, in
+production and production\-like environments, but may \fInot\fP be
+desirable for testing.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-auth
+Enables database authentication for users connecting from remote
+hosts. configure users via the \fBmongo shell shell\fP. If no users exist, the localhost interface
+will continue to have access to the database until the you create
+the first user.
+.sp
+See the \fBSecurity and Authentication\fP
+page for more information regarding this functionality.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-cpu
+Forces \fI\%mongod\fP to report the percentage of CPU time in
+write lock. \fI\%mongod\fP generates output every four
+seconds. MongoDB writes this data to standard output or the logfile
+if using the \fBlogpath\fP option.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-dbpath <path>
+Specify a directory for the \fI\%mongod\fP instance to store its
+data. Typical locations include: \fB/srv/mongodb\fP,
+\fB/var/lib/mongodb\fP or \fB/opt/mongodb\fP
+.sp
+Unless specified, \fI\%mongod\fP will look for data files in the
+default \fB/data/db\fP directory. (Windows systems use the
+\fB\edata\edb\fP directory.) If you installed using a package
+management system. Check the \fB/etc/mongodb.conf\fP file provided by
+your packages to see the configuration of the \fBdbpath\fP.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-diaglog <value>
+Creates a very verbose, \fIdiagnostic log\fP for troubleshooting
+and recording various errors. MongoDB writes these log files in the
+\fBdbpath\fP directory in a series of files that begin with
+the string \fBdiaglog\fP and end with the initiation time of the
+logging as a hex string.
+.sp
+The specified value configures the level of verbosity. Possible
+values, and their impact are as follows.
+.TS
+center;
+|l|l|.
+_
+T{
+\fBValue\fP
+T} T{
+\fBSetting\fP
+T}
+_
+T{
+0
+T} T{
+off. No logging.
+T}
+_
+T{
+1
+T} T{
+Log write operations.
+T}
+_
+T{
+2
+T} T{
+Log read operations.
+T}
+_
+T{
+3
+T} T{
+Log both read and write operations.
+T}
+_
+T{
+7
+T} T{
+Log write and some read operations.
+T}
+_
+.TE
+.sp
+You can use the \fBmongosniff\fP tool to replay this output
+for investigation. Given a typical diaglog file, located at
+\fB/data/db/diaglog.4f76a58c\fP, you might use a command in the
+following form to read these files:
+.sp
+.nf
+.ft C
+mongosniff \-\-source DIAGLOG /data/db/diaglog.4f76a58c
+.ft P
+.fi
+.sp
+\fI\%--diaglog\fP is for internal use and not intended for most
+users.
+.IP Warning
+Setting the diagnostic level to \fB0\fP will cause \fI\%mongod\fP
+to stop writing data to the \fIdiagnostic log\fP file. However,
+the \fI\%mongod\fP instance will continue to keep the file open,
+even if it is no longer writing data to the file. If you want to
+rename, move, or delete the diagnostic log you must cleanly shut
+down the \fI\%mongod\fP instance before doing so.
+.RE
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-directoryperdb
+Alters the storage pattern of the data directory to store each
+database\(aqs files in a distinct folder. This option will create
+directories within the \fI\%--dbpath\fP named for each directory.
+.sp
+Use this option in conjunction with your file system and device
+configuration so that MongoDB will store data on a number of
+distinct disk devices to increase write throughput or disk
+capacity.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-journal
+Enables operation journaling to ensure write durability and data
+consistency. \fI\%mongod\fP enables journaling by default on
+64\-bit builds of versions after 2.0.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-journalOptions <arguments>
+Provides functionality for testing. Not for general use, and may
+affect database integrity.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-journalCommitInterval <value>
+Specifies the maximum amount of time for \fI\%mongod\fP to allow
+between journal operations. The default value is 100 milliseconds,
+while possible values range from 2 to 300 milliseconds. Lower
+values increase the durability of the journal, at the expense of
+disk performance.
+.sp
+To force \fI\%mongod\fP to commit to the journal more frequently,
+you can specify \fBj:true\fP. When a write operation with \fBj:true\fP
+pending, \fI\%mongod\fP will reduce
+\fBjournalCommitInterval\fP to a third of the set value.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-ipv6
+Specify this option to enable IPv6 support. This will allow clients
+to connect to \fI\%mongod\fP using IPv6
+networks. \fI\%mongod\fP disables IPv6 support by default in
+\fI\%mongod\fP and all utilities.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-jsonp
+Permits \fIJSONP\fP access via an HTTP interface. Consider the
+security implications of allowing this activity before enabling
+this option.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-noauth
+Disable authentication. Currently the default. Exists for future
+compatibility and clarity.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-nohttpinterface
+Disables the HTTP interface.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-nojournal
+Disables the durability journaling. By default, \fI\%mongod\fP
+enables journaling in 64\-bit versions after v2.0.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-noprealloc
+Disables the preallocation of data files. This will shorten the
+start up time in some cases, but can cause significant performance
+penalties during normal operations.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-noscripting
+Disables the scripting engine.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-notablescan
+Forbids operations that require a table scan.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-nssize <value>
+Specifies the default size for namespace files (i.e \fB.ns\fP). This
+option has no impact on the size of existing namespace files. The
+maximum size is 2047 megabytes.
+.sp
+The default value is 16 megabytes; this provides for approximately
+24,000 namespaces. Each collection, as well as each index, counts as
+a namespace.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-profile <level>
+Changes the level of database profiling, which inserts information
+about operation performance into output of \fI\%mongod\fP or the log
+file. The following levels are available:
+.TS
+center;
+|l|l|.
+_
+T{
+\fBLevel\fP
+T} T{
+\fBSetting\fP
+T}
+_
+T{
+0
+T} T{
+Off. No profiling.
+T}
+_
+T{
+1
+T} T{
+On. Only includes slow operations.
+T}
+_
+T{
+2
+T} T{
+On. Includes all operations.
+T}
+_
+.TE
+.sp
+Profiling is off by default. Database profiling can impact database
+performance. Enable this option only after careful consideration.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-quota
+Enables a maximum limit for the number data files each database can
+have. When running with \fI\%--quota\fP, there are a maximum of
+8 data files per database. Adjust the quota with the
+\fI\%--quotaFiles\fP option.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-quotaFiles <number>
+Modify limit on the number of data files per database. This option
+requires the \fI\%--quota\fP setting. The default value for
+\fI\%--quotaFiles\fP is 8.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-rest
+Enables the simple \fIREST\fP API.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-repair
+Runs a repair routine on all databases. This is equivalent
+to shutting down and running the \fBrepairDatabase\fP database
+command on all databases.
+.IP Warning
+In general, if you have an intact copy of your data, such as
+would exist on a very recent backup or an intact member of a
+\fIreplica set\fP, \fBdo not\fP use \fBrepairDatabase\fP
+or related options like \fBdb.repairDatabase()\fP in the
+\fBmongo\fP shell or \fI\%mongod --repair\fP. Restore
+from an intact copy of your data.
+.RE
+.IP Note
+When using \fIjournaling\fP, there is almost never
+any need to run \fBrepairDatabase\fP. In the event of an
+unclean shutdown, the server will be able restore the data files
+to a pristine state automatically.
+.RE
+.sp
+Changed in version 2.1.2.
+.sp
+If you run the repair option \fIand\fP have data in a journal file,
+\fI\%mongod\fP will refuse to start. In these cases you should
+start \fI\%mongod\fP without the \fI\%--repair\fP option to
+allow \fI\%mongod\fP to recover data from the journal. This will
+complete more quickly and will result in a more consistent and
+complete data set.
+.sp
+To continue the repair operation despite the journal files, shut down
+\fI\%mongod\fP cleanly and restart with the \fI\%--repair\fP
+option.
+.IP Note
+\fI\%--repair\fP copies data from the source data files into
+new data files in the \fBrepairpath\fP, and then replaces
+the original data files with the repaired data files. \fIIf\fP
+\fBrepairpath\fP is on the same device as
+\fBdbpath\fP, you \fImay\fP interrupt a \fI\%mongod\fP
+running \fI\%--repair\fP without affecting the integrity of
+the data set.
+.RE
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-repairpath <path>
+Specifies the root directory containing MongoDB data files, to use
+for the \fI\%--repair\fP operation. Defaults to a \fB_tmp\fP
+directory within the \fBdbpath\fP.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-setParameter <options>
+New in version 2.4.
+.sp
+Specifies an option to configure on startup. Specify multiple
+options with multiple \fI\%--setParameter\fP options. See
+\fB/reference/parameters\fP for full documentation of these
+parameters. The \fBsetParameter\fP database command provides
+access to many of these parameters. \fI\%--setParameter\fP supports the
+following options:
+.INDENT 7.0
+.IP \(bu 2
+\fBenableLocalhostAuthBypass\fP
+.IP \(bu 2
+\fBenableTestCommands\fP
+.IP \(bu 2
+\fBjournalCommitInterval\fP
+.IP \(bu 2
+\fBlogLevel\fP
+.IP \(bu 2
+\fBlogUserIds\fP
+.IP \(bu 2
+\fBnotablescan\fP
+.IP \(bu 2
+\fBquiet\fP
+.IP \(bu 2
+\fBreplApplyBatchSize\fP
+.IP \(bu 2
+\fBreplIndexPrefetch\fP
+.IP \(bu 2
+\fBsupportCompatibilityFormPrivilegeDocuments\fP
+.IP \(bu 2
+\fBsyncdelay\fP
+.IP \(bu 2
+\fBtraceExceptions\fP
+.UNINDENT
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-slowms <value>
+Defines the value of "slow," for the \fI\%--profile\fP
+option. The database logs all slow queries to the log, even when
+the profiler is not turned on. When the database profiler is on,
+\fI\%mongod\fP the profiler writes to the \fBsystem.profile\fP
+collection. See the \fBprofile\fP command for more information on the
+database profiler.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-smallfiles
+Enables a mode where MongoDB uses a smaller default file
+size. Specifically, \fI\%--smallfiles\fP reduces the initial
+size for data files and limits them to 512
+megabytes. \fI\%--smallfiles\fP also reduces the size of each
+\fIjournal\fP files from 1 gigabyte to 128 megabytes.
+.sp
+Use \fI\%--smallfiles\fP if you have a large number of databases
+that each holds a small quantity of data. \fI\%--smallfiles\fP can
+lead your \fI\%mongod\fP to create a large number of files,
+which may affect performance for larger databases.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-shutdown
+Used in \fIcontrol scripts\fP, the
+\fI\%--shutdown\fP will cleanly and safely terminate the
+\fI\%mongod\fP process. When invoking \fI\%mongod\fP with this
+option you must set the \fI\%--dbpath\fP option either directly
+or by way of the \fBconfiguration file\fP and the \fI\%--config\fP
+option.
+.sp
+\fI\%--shutdown\fP is only available on Linux systems.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-syncdelay <value>
+\fI\%mongod\fP writes data very quickly to the journal, and
+lazily to the data files. \fI\%--syncdelay\fP controls how much
+time can pass before MongoDB flushes data to the \fIdatabase files\fP
+via an \fIfsync\fP operation. The default setting is 60 seconds.
+In almost every situation you should not set this value and use the
+default setting.
+.sp
+The \fBserverStatus\fP command reports the background flush
+thread\(aqs status via the \fBbackgroundFlushing\fP
+field.
+.sp
+\fBsyncdelay\fP has no effect on the \fBjournal\fP
+files or \fBjournaling\fP.
+.IP Warning
+If you set \fI\%--syncdelay\fP to \fB0\fP, MongoDB will not
+sync the memory mapped files to disk. Do not set this value on
+production systems.
+.RE
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-sysinfo
+Returns diagnostic system information and then exits. The
+information provides the page size, the number of physical pages,
+and the number of available physical pages.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-upgrade
+Upgrades the on\-disk data format of the files specified by the
+\fI\%--dbpath\fP to the latest version, if needed.
+.sp
+This option only affects the operation of \fI\%mongod\fP if the
+data files are in an old format.
+.IP Note
+In most cases you should \fBnot\fP set this value, so you can
+exercise the most control over your upgrade process. See the MongoDB
+\fI\%release notes\fP (on the
+download page) for more information about the upgrade process.
+.RE
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-traceExceptions
+For internal diagnostic use only.
+.UNINDENT
+.SS Replication Options
+.INDENT 0.0
+.TP
+.B \-\-replSet <setname>
+Use this option to configure replication with replica sets. Specify
+a setname as an argument to this set. All hosts must have the same
+set name.
+.IP "See also"
+.sp
+"\fB/replication\fP,"
+"\fB/administration/replica\-sets\fP," and
+"\fB/reference/replica\-configuration\fP"
+.RE
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-oplogSize <value>
+Specifies a maximum size in megabytes for the replication operation
+log (e.g. \fIoplog\fP.) By \fI\%mongod\fP creates an
+\fIoplog\fP based on the maximum amount of space available. For
+64\-bit systems, the op log is typically 5% of available disk space.
+.sp
+Once the \fI\%mongod\fP has created the oplog for the first
+time, changing \fI\%--oplogSize\fP will not affect the size of
+the oplog.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-fastsync
+In the context of \fIreplica set\fP replication, set this option
+if you have seeded this member with a snapshot of the
+\fIdbpath\fP of another member of the set. Otherwise the
+\fI\%mongod\fP will attempt to perform an initial sync,
+as though the member were a new member.
+.IP Warning
+If the data is not perfectly synchronized \fIand\fP
+\fI\%mongod\fP starts with \fBfastsync\fP, then the
+secondary or slave will be permanently out of sync with the
+primary, which may cause significant consistency problems.
+.RE
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-replIndexPrefetch
+New in version 2.2.
+.sp
+You must use \fI\%--replIndexPrefetch\fP in conjunction with
+\fBreplSet\fP. The default value is \fBall\fP and available
+options are:
+.INDENT 7.0
+.IP \(bu 2
+\fBnone\fP
+.IP \(bu 2
+\fBall\fP
+.IP \(bu 2
+\fB_id_only\fP
+.UNINDENT
+.sp
+By default \fIsecondary\fP members of a \fIreplica set\fP will
+load all indexes related to an operation into memory before
+applying operations from the oplog. You can modify this behavior so
+that the secondaries will only load the \fB_id\fP index. Specify
+\fB_id_only\fP or \fBnone\fP to prevent the \fI\%mongod\fP from
+loading \fIany\fP index into memory.
+.UNINDENT
+.SS Master\-Slave Replication
+.sp
+These options provide access to conventional master\-slave database
+replication. While this functionality remains accessible in MongoDB,
+replica sets are the preferred configuration for database replication.
+.INDENT 0.0
+.TP
+.B \-\-master
+Configures \fI\%mongod\fP to run as a replication
+\fImaster\fP.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-slave
+Configures \fI\%mongod\fP to run as a replication
+\fIslave\fP.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-source <host><:port>
+For use with the \fI\%--slave\fP option, the \fB\-\-source\fP option
+designates the server that this instance will replicate.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-only <arg>
+For use with the \fI\%--slave\fP option, the \fB\-\-only\fP option
+specifies only a single \fIdatabase\fP to replicate.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-slavedelay <value>
+For use with the \fI\%--slave\fP option, the \fB\-\-slavedelay\fP
+option configures a "delay" in seconds, for this slave to wait to
+apply operations from the \fImaster\fP node.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-autoresync
+For use with the \fI\%--slave\fP option, the
+\fI\%--autoresync\fP option allows this slave to automatically
+resync if the local data is more than 10 seconds behind the
+master. This option may be problematic if the \fIoplog\fP is too
+small (controlled by the \fI\%--oplogSize\fP option.) If the
+\fIoplog\fP not large enough to store the difference in changes
+between the master\(aqs current state and the state of the slave, this
+node will forcibly resync itself unnecessarily. When you set the If
+the \fI\%--autoresync\fP option the slave will not attempt an
+automatic resync more than once in a ten minute period.
+.UNINDENT
+.SS Sharding Cluster Options
+.INDENT 0.0
+.TP
+.B \-\-configsvr
+Declares that this \fI\%mongod\fP instance serves as the
+\fIconfig database\fP of a sharded cluster. When running with
+this option, clients will not be able to write data to any database
+other than \fBconfig\fP and \fBadmin\fP. The default port for
+\fI\%mongod\fP with this option is \fB27019\fP and
+\fI\%mongod\fP writes all data files to the \fB/configdb\fP
+sub\-directory of the \fI\%--dbpath\fP directory.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-shardsvr
+Configures this \fI\%mongod\fP instance as a shard in a
+partitioned cluster. The default port for these instances is
+\fB27018\fP. The only effect of \fI\%--shardsvr\fP is to change
+the port number.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-noMoveParanoia
+Disables a "paranoid mode" for data writes for chunk migration
+operation. See the
+\fIchunk migration\fP
+and \fBmoveChunk\fP command documentation for more information.
+.sp
+By default \fI\%mongod\fP will save copies of migrated chunks on
+the "from" server during migrations as "paranoid mode." Setting
+this option disables this paranoia.
+.UNINDENT
+.SS SSL Options
+.IP "See"
+.sp
+\fB/administration/ssl\fP for full documentation of
+MongoDB\(aqs support.
+.RE
+.INDENT 0.0
+.TP
+.B \-\-sslOnNormalPorts
+New in version 2.2.
+.IP Note
+The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support
+for SSL. To use SSL you can either compile MongoDB with SSL
+support or use the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for
+more information about SSL and MongoDB.
+.RE
+.sp
+Enables SSL for \fI\%mongod\fP. With \fI\%--sslOnNormalPorts\fP,
+a \fI\%mongod\fP requires SSL encryption for all connections on the
+default MongoDB port, or the port specified by \fI\%--port\fP. By
+default, \fI\%--sslOnNormalPorts\fP is disabled.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-sslPEMKeyFile <filename>
+New in version 2.2.
+.IP Note
+The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support
+for SSL. To use SSL you can either compile MongoDB with SSL
+support or use the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for
+more information about SSL and MongoDB.
+.RE
+.sp
+Specifies the \fB.pem\fP file that contains both the SSL
+certificate and key. Specify the file name of the \fB.pem\fP
+file using relative or absolute paths
+.sp
+When using \fI\%--sslOnNormalPorts\fP, you must specify
+\fI\%--sslPEMKeyFile\fP.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-sslPEMKeyPassword <value>
+New in version 2.2.
+.IP Note
+The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support
+for SSL. To use SSL you can either compile MongoDB with SSL
+support or use the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for
+more information about SSL and MongoDB.
+.RE
+.sp
+Specifies the password to de\-crypt the certificate\-key file
+(i.e. \fI\%--sslPEMKeyFile\fP). Only use
+\fI\%--sslPEMKeyPassword\fP if the certificate\-key file is
+encrypted. In all cases, \fI\%mongod\fP will redact the password from
+all logging and reporting output.
+.sp
+Changed in version 2.4: \fI\%--sslPEMKeyPassword\fP is only needed when the private
+key is encrypted. In earlier versions \fI\%mongod\fP would require
+\fI\%--sslPEMKeyPassword\fP whenever using
+\fI\%--sslOnNormalPorts\fP, even when the private key was not
+encrypted.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-sslCAFile <filename>
+New in version 2.4.
+.IP Note
+The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support
+for SSL. To use SSL you can either compile MongoDB with SSL
+support or use the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for
+more information about SSL and MongoDB.
+.RE
+.sp
+Specifies the \fB.pem\fP file that contains the root certificate
+chain from the Certificate Authority. Specify the file name of the \fB.pem\fP
+file using relative or absolute paths
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-sslCRLFile <filename>
+New in version 2.4.
+.IP Note
+The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support
+for SSL. To use SSL you can either compile MongoDB with SSL
+support or use the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for
+more information about SSL and MongoDB.
+.RE
+.sp
+Specifies the \fB.pem\fP file that contains the Certificate
+Revocation List. Specify the file name of the \fB.pem\fP
+file using relative or absolute paths
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-sslWeakCertificateValidation
+New in version 2.4.
+.IP Note
+The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support
+for SSL. To use SSL you can either compile MongoDB with SSL
+support or use the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for
+more information about SSL and MongoDB.
+.RE
+.sp
+Disables the requirement for SSL certificate validation, that
+\fI\%--sslCAFile\fP enables. With
+\fI\%--sslWeakCertificateValidation\fP, \fI\%mongod\fP will accept
+connections if the client does not present a certificate when
+establishing the connection.
+.sp
+If the client presents a certificate and \fI\%mongod\fP has
+\fI\%--sslWeakCertificateValidation\fP enabled, \fI\%mongod\fP
+will validate the certificate using the root certificate chain
+specified by \fI\%--sslCAFile\fP, and reject clients with invalid
+certificates.
+.sp
+Use \fI\%--sslWeakCertificateValidation\fP if you have a mixed
+deployment that includes clients that do not or cannot present
+certificates to \fI\%mongod\fP.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-sslFIPSMode
+New in version 2.4.
+.IP Note
+The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support
+for SSL. To use SSL you can either compile MongoDB with SSL
+support or use the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for
+more information about SSL and MongoDB.
+.RE
+.sp
+When specified, \fI\%mongod\fP will use the FIPS mode of the
+installed OpenSSL library. Your system must have a FIPS compliant
+OpenSSL library to use \fI\%--sslFIPSMode\fP.
+.UNINDENT
+.SH USAGE
+.sp
+In common usage, the invocation of \fI\%mongod\fP will resemble the
+following in the context of an initialization or control script:
+.sp
+.nf
+.ft C
+mongod \-\-config /etc/mongodb.conf
+.ft P
+.fi
+.sp
+See the "\fB/reference/configuration\-options\fP" for more information
+on how to configure \fI\%mongod\fP using the configuration file.
+.SH AUTHOR
+MongoDB Documentation Project
+.SH COPYRIGHT
+2011-2013, 10gen, Inc.
+.\" Generated by docutils manpage writer.
+.
diff --git a/debian/mongodump.1 b/debian/mongodump.1
index dc95440baa6..8809181c81c 100644
--- a/debian/mongodump.1
+++ b/debian/mongodump.1
@@ -1,62 +1,355 @@
-.TH MONGODUMP "1" "June 2009" "10gen" "Mongo Database"
-.SH "NAME"
-mongodump \- the Mongo dump tool
-.SH "SYNOPSIS"
-\fBmongodump [\fIOPTIONS\fR]\fR
-.SH "DESCRIPTION"
-.PP
-\fBmongodump\fR
-is a tool to output a binary representation of a database. It is mostly used for doing hot backups of a database.
-.SH "OPTIONS"
+.TH "MONGODUMP" "1" "March 14, 2013" "2.2.3" "mongodb-manual"
+.SH NAME
+mongodump \- MongoDB
+.
+.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
+..
+.\" Man page generated from reStructuredText.
+.
+.SH SYNOPSIS
+.sp
+\fI\%mongodump\fP is a utility for creating a binary export of the
+contents of a database. Consider using this utility as part an
+effective \fBbackup strategy\fP. Use in
+conjunction with \fBmongorestore\fP to provide restore
+functionality.
+.IP Note
+The format of data created by \fI\%mongodump\fP tool from the
+2.2 distribution or later is different and incompatible with
+earlier versions of \fBmongod\fP.
+.RE
+.IP "See also"
+.sp
+"\fBmongorestore\fP" and "\fB/administration/backups\fP".
+.RE
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B mongodump
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-help
-show usage information
+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 the
+option multiple times, (e.g. \fB\-vvvvv\fP.)
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-version
-show version information
+Returns the version of the \fI\%mongodump\fP utility and exits.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-h, \-\-host HOST
-server to connect to (default HOST=localhost)
+.B \-\-host <hostname><:port>
+Specifies a resolvable hostname for the \fBmongod\fP that you wish to
+use to create the database dump. By default \fI\%mongodump\fP will
+attempt to connect to a MongoDB process ruining on the localhost
+port number \fB27017\fP.
+.sp
+Optionally, specify a port number to connect a MongoDB instance
+running on a port other than \fB27017\fP.
+.sp
+To connect to a replica set, use the \fI\%--host\fP
+argument with a setname, followed by a slash and a comma\-separated
+list of host names and port numbers. The \fI\%mongodump\fP
+utility will, given the seed of at least one connected set member,
+connect to the primary member of that set. This option would resemble:
+.sp
+.nf
+.ft C
+mongodump \-\-host repl0/mongo0.example.net,mongo0.example.net:27018,mongo1.example.net,mongo2.example.net
+.ft P
+.fi
+.sp
+You can always connect directly to a single MongoDB instance by
+specifying the host and port number directly.
+.UNINDENT
+.INDENT 0.0
.TP
-.B\-\-port arg
-server port. Can also use \-\-host hostname:port
+.B \-\-port <port>
+Specifies the port number, if the MongoDB instance is not running
+on the standard port. (i.e. \fB27017\fP) You may also specify a port
+number using the \fI\%--host\fP option.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-ipv6
-enable IPv6 support (disabled by default)
+Enables IPv6 support that allows \fI\%mongodump\fP to connect to
+the MongoDB instance using an IPv6 network. All MongoDB programs
+and processes, including \fI\%mongodump\fP, disable IPv6 support
+by default.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-u|\-\-username USERNAME
-specify user to log in as
+.B \-\-ssl
+New in version 2.4: MongoDB added support for SSL connections to \fBmongod\fP
+instances in mongodump.
+.IP Note
+SSL support in mongodump is not compiled into the default
+distribution of MongoDB. See \fB/administration/ssl\fP for more
+information on SSL and MongoDB.
+.sp
+Additionally, mongodump does not support connections to
+\fBmongod\fP instances that require client certificate
+validation.
+.RE
+.sp
+Allows \fI\%mongodump\fP to connect to \fBmongod\fP
+instance over an SSL connection.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-p|\-\-password PASSWORD
-specify password of user (notice there is no space)
+.B \-\-username <username>, \-u <username>
+Specifies a username to authenticate to the MongoDB instance, if
+your database requires authentication. Use in conjunction with the
+\fI\%--password\fP option to supply a
+password.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-d, \-\-db DATABASE
-database to use
+.B \-\-password <password>, \-p <password>
+Specifies a password to authenticate to the MongoDB instance. Use
+in conjunction with the \fI\%--username\fP
+option to supply a username.
+.sp
+If you specify a \fI\%--username\fP
+without the \fI\%--password\fP option, \fI\%mongodump\fP will
+prompt for a password interactively.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-c, \-\-c COLLECTION
-collection to use
+.B \-\-authenticationDatabase <dbname>
+New in version 2.4.
+.sp
+Specifies the database that holds the user\(aqs (e.g
+\fI\%--username\fP) credentials.
+.sp
+By default, \fI\%mongodump\fP assumes that the database specified to the
+\fI\%--db\fP argument holds the user\(aqs credentials, unless you
+specify \fI\%--authenticationDatabase\fP.
+.sp
+See \fBuserSource\fP,
+\fB/reference/privilege\-documents\fP and
+\fB/reference/user\-privileges\fP for more information about
+delegated authentication in MongoDB.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-o, \-\-out DIRECTORY
-output directory or - for stdout.
+.B \-\-authenticationMechanism <name>
+New in version 2.4.
+.sp
+Specifies the authentication mechanism. By default, the
+authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB
+challenge/response authentication mechanism. In the MongoDB Subscriber Edition,
+\fI\%mongodump\fP also includes support for \fBGSSAPI\fP to handle
+Kerberos authentication.
+.sp
+See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP
+for more information about Kerberos authentication.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-dbpath PATH
-directly access mongod data files in this path, instead of connecting to a mongod instance
+.B \-\-dbpath <path>
+Specifies the directory of the MongoDB data files. If used, the
+\fI\%--dbpath\fP option enables \fI\%mongodump\fP to attach
+directly to local data files and copy the data without the
+\fBmongod\fP. To run with \fI\%--dbpath\fP,
+\fI\%mongodump\fP needs to restrict access to the data
+directory: as a result, no \fBmongod\fP can access the same
+path while the process runs.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-directoryperdb
-if dbpath specified, each db is in a separate directory
+Use the \fI\%--directoryperdb\fP in conjunction with the
+corresponding option to \fBmongod\fP. This option allows
+\fI\%mongodump\fP to read data files organized with each
+database located in a distinct directory. This option is only
+relevant when specifying the \fI\%--dbpath\fP option.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-journal
+Allows \fI\%mongodump\fP operations to use the durability
+\fIjournal\fP to ensure that the export is in a
+consistent state. This option is only relevant when specifying the
+\fI\%--dbpath\fP option.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-db <db>, \-d <db>
+Use the \fI\%--db\fP option to specify a database for
+\fI\%mongodump\fP to backup. If you do not specify a DB,
+\fI\%mongodump\fP copies all databases in this instance into the
+dump files. Use this option to backup or copy a smaller subset of
+your data.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-query
-JSON query filter
+.B \-\-collection <collection>, \-c <collection>
+Use the \fI\%--collection\fP option to specify a collection for
+\fI\%mongodump\fP to backup. If you do not specify a collection,
+this option copies all collections in the specified database or
+instance to the dump files. Use this option to backup or copy a
+smaller subset of your data.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-out <path>, \-o <path>
+Specifies a path where \fI\%mongodump\fP and store the output
+the database dump. To output the database dump to standard output,
+specify a \fB\-\fP rather than a path.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-query <json>, \-q <json>
+Provides a query to limit (optionally) the documents included in
+the output of \fI\%mongodump\fP.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-oplog
-Use oplog for point-in-time snapshotting
+Use this option to ensure that \fI\%mongodump\fP creates a dump
+of the database that includes an \fIoplog\fP, to create a
+point\-in\-time snapshot of the state of a \fBmongod\fP instance. To
+restore to a specific point\-in\-time backup, use the output created
+with this option in conjunction with \fImongorestore \-\-oplogReplay\fP.
+.sp
+Without \fI\%--oplog\fP, if there are write operations during the
+dump operation, the dump will not reflect a single moment in
+time. Changes made to the database during the update process can
+affect the output of the backup.
+.sp
+\fI\%--oplog\fP has no effect when running \fI\%mongodump\fP
+against a \fBmongos\fP instance to dump the entire contents of
+a sharded cluster. However, you can use \fI\%--oplog\fP to dump
+individual shards.
+.IP Note
+\fI\%--oplog\fP only works against nodes that maintain a
+\fIoplog\fP. This includes all members of a replica set, as
+well as \fImaster\fP nodes in master/slave replication
+deployments.
+.RE
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-repair
-try to recover a crashed database (needs \-\-dbpath)
-.SH "COPYRIGHT"
-.PP
-Copyright 2007\-2011 10gen
-.SH "SEE ALSO"
-For more information, please refer to the mongodump page in the MongoDB manual, available at http://dochub.mongodb.org/core/mongodumpmanpage
-.SH "AUTHOR"
-Kristina Chodorow
+Use this option to run a repair option in addition to dumping the
+database. The repair option attempts to repair a database that may
+be in an inconsistent state as a result of an improper shutdown or
+\fBmongod\fP crash.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-forceTableScan
+Forces \fI\%mongodump\fP to scan the data store directly:
+typically, \fI\%mongodump\fP saves entries as they appear in the
+index of the \fB_id\fP field. Use \fI\%--forceTableScan\fP to skip
+the index and scan the data directly. Typically there are two cases
+where this behavior is preferable to the default:
+.INDENT 7.0
+.IP 1. 3
+If you have key sizes over 800 bytes that would not be present
+in the \fB_id\fP index.
+.IP 2. 3
+Your database uses a custom \fB_id\fP field.
+.UNINDENT
+.sp
+When you run with \fI\%--forceTableScan\fP, \fI\%mongodump\fP
+does not use \fB$snapshot\fP. As a result, the dump produced
+by \fI\%mongodump\fP can reflect the state of the database at
+many different points in time.
+.IP Warning
+Use \fI\%--forceTableScan\fP with extreme caution
+and consideration.
+.RE
+.IP Warning
+Changed in version 2.2: When used in combination with \fBfsync\fP or
+\fBdb.fsyncLock()\fP, \fBmongod\fP may block some
+reads, including those from \fI\%mongodump\fP, when
+queued write operation waits behind the \fBfsync\fP
+lock.
+.RE
+.UNINDENT
+.SH BEHAVIOR
+.sp
+When running \fI\%mongodump\fP against a \fBmongos\fP instance
+where the \fIsharded cluster\fP consists of \fIreplica sets\fP, the \fIread preference\fP of the operation will prefer reads
+from \fIsecondary\fP members of the set.
+.SH USAGE
+.sp
+See the \fB/tutorial/backup\-databases\-with\-binary\-database\-dumps\fP
+for a larger overview of \fI\%mongodump\fP usage. Also see the
+"\fBmongorestore\fP" document for an overview of the
+\fBmongorestore\fP, which provides the related inverse
+functionality.
+.sp
+The following command, creates a dump file that contains only the
+collection named \fBcollection\fP in the database named \fBtest\fP. In
+this case the database is running on the local interface on port
+\fB27017\fP:
+.sp
+.nf
+.ft C
+mongodump \-\-collection collection \-\-db test
+.ft P
+.fi
+.sp
+In the next example, \fI\%mongodump\fP creates a backup of the
+database instance stored in the \fB/srv/mongodb\fP directory on the
+local machine. This requires that no \fBmongod\fP instance is
+using the \fB/srv/mongodb\fP directory.
+.sp
+.nf
+.ft C
+mongodump \-\-dbpath /srv/mongodb
+.ft P
+.fi
+.sp
+In the final example, \fI\%mongodump\fP creates a database dump
+located at \fB/opt/backup/mongodump\-2011\-10\-24\fP, from a database
+running on port \fB37017\fP on the host \fBmongodb1.example.net\fP and
+authenticating using the username \fBuser\fP and the password
+\fBpass\fP, as follows:
+.sp
+.nf
+.ft C
+mongodump \-\-host mongodb1.example.net \-\-port 37017 \-\-username user \-\-password pass /opt/backup/mongodump\-2011\-10\-24
+.ft P
+.fi
+.SH AUTHOR
+MongoDB Documentation Project
+.SH COPYRIGHT
+2011-2013, 10gen, Inc.
+.\" Generated by docutils manpage writer.
+.
diff --git a/debian/mongoexport.1 b/debian/mongoexport.1
index d702671102b..d82825f2a7c 100644
--- a/debian/mongoexport.1
+++ b/debian/mongoexport.1
@@ -1,75 +1,351 @@
-.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"
+.TH "MONGOEXPORT" "1" "March 14, 2013" "2.2.3" "mongodb-manual"
+.SH NAME
+mongoexport \- MongoDB
+.
+.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
+..
+.\" Man page generated from reStructuredText.
+.
+.SH SYNOPSIS
+.sp
+\fI\%mongoexport\fP is a utility that produces a JSON or CSV export
+of data stored in a MongoDB instance. See the
+"\fB/administration/import\-export\fP" document for a more in depth
+usage overview, and the "\fBmongoimport\fP" document for more
+information regarding the \fBmongoimport\fP utility, which
+provides the inverse "importing" capability.
+.IP Note
+Do not use \fBmongoimport\fP and \fI\%mongoexport\fP for
+full\-scale backups because they may not reliably capture data type
+information. Use \fBmongodump\fP and \fBmongorestore\fP as
+described in "\fB/administration/backups\fP" for this kind of
+functionality.
+.RE
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B mongoexport
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-help
-show usage information
+Returns a basic help and usage text.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-version
-show version information
+.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
+the option multiple times, (e.g. \fB\-vvvvv\fP.)
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-v, \-\-verbose
-be more verbose (include multiple times for more verbosity
-e.g. \-vvvvv)
+.B \-\-version
+Returns the version of the \fI\%mongoexport\fP utility.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-h, \-\-host HOST
-server to connect to (default HOST=localhost)
+.B \-\-host <hostname><:port>
+Specifies a resolvable hostname for the \fBmongod\fP from which you
+want to export data. By default \fI\%mongoexport\fP attempts to
+connect to a MongoDB process ruining on the localhost port number
+\fB27017\fP.
+.sp
+Optionally, specify a port number to connect a MongoDB instance
+running on a port other than \fB27017\fP.
+.sp
+To connect to a replica set, you can specify the replica set seed
+name, and a seed list of set members, in the following format:
+.sp
+.nf
+.ft C
+<replica_set_name>/<hostname1><:port>,<hostname2:<port>,...
+.ft P
+.fi
+.UNINDENT
+.INDENT 0.0
.TP
-.B\-\-port arg
-server port. Can also use \-\-host hostname:port
+.B \-\-port <port>
+Specifies the port number, if the MongoDB instance is not running on
+the standard port. (i.e. \fB27017\fP) You may also specify a port
+number using the \fI\%mongoexport --host\fP command.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-ipv6
-enable IPv6 support (disabled by default)
+Enables IPv6 support that allows \fI\%mongoexport\fP to connect
+to the MongoDB instance using an IPv6 network. All MongoDB programs
+and processes, including \fI\%mongoexport\fP, disable IPv6
+support by default.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-ssl
+New in version 2.4: MongoDB added support for SSL connections to \fBmongod\fP
+instances in mongoexport.
+.IP Note
+SSL support in mongoexport is not compiled into the default
+distribution of MongoDB. See \fB/administration/ssl\fP for more
+information on SSL and MongoDB.
+.sp
+Additionally, mongoexport does not support connections to
+\fBmongod\fP instances that require client certificate
+validation.
+.RE
+.sp
+Allows \fI\%mongoexport\fP to connect to \fBmongod\fP
+instance over an SSL connection.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-username <username>, \-u <username>
+Specifies a username to authenticate to the MongoDB instance, if your
+database requires authentication. Use in conjunction with the
+\fI\%mongoexport --password\fP option to supply a password.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-password <password>, \-p <password>
+Specifies a password to authenticate to the MongoDB instance. Use
+in conjunction with the \fI\%--username\fP
+option to supply a username.
+.sp
+If you specify a \fI\%--username\fP
+without the \fI\%--password\fP option, \fI\%mongoexport\fP
+will prompt for a password interactively.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-u|\-\-username USERNAME
-specify user to log in as
+.B \-\-authenticationDatabase <dbname>
+New in version 2.4.
+.sp
+Specifies the database that holds the user\(aqs (e.g
+\fI\%--username\fP) credentials.
+.sp
+By default, \fI\%mongoexport\fP assumes that the database specified to the
+\fI\%--db\fP argument holds the user\(aqs credentials, unless you
+specify \fI\%--authenticationDatabase\fP.
+.sp
+See \fBuserSource\fP,
+\fB/reference/privilege\-documents\fP and
+\fB/reference/user\-privileges\fP for more information about
+delegated authentication in MongoDB.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-p|\-\-password PASSWORD
-specify password of user
+.B \-\-authenticationMechanism <name>
+New in version 2.4.
+.sp
+Specifies the authentication mechanism. By default, the
+authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB
+challenge/response authentication mechanism. In the MongoDB Subscriber Edition,
+\fI\%mongoexport\fP also includes support for \fBGSSAPI\fP to handle
+Kerberos authentication.
+.sp
+See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP
+for more information about Kerberos authentication.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-dbpath PATH
-directly access mongod data files in this path, instead of connecting to a mongod instance
+.B \-\-dbpath <path>
+Specifies the directory of the MongoDB data files. If used, the
+\fB\-\-dbpath\fP option enables \fI\%mongoexport\fP to attach
+directly to local data files and insert the data without the
+\fBmongod\fP. To run with \fB\-\-dbpath\fP, \fI\%mongoexport\fP
+needs to lock access to the data directory: as a result, no
+\fBmongod\fP can access the same path while the process runs.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-directoryperdb
-if dbpath specified, each db is in a separate directory
+Use the \fI\%--directoryperdb\fP in conjunction with the
+corresponding option to \fBmongod\fP, which allows
+\fI\%mongoexport\fP to export data into MongoDB instances that
+have every database\(aqs files saved in discrete directories on the
+disk. This option is only relevant when specifying the
+\fI\%--dbpath\fP option.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-d, \-\-db DATABASE
-database to use
+.B \-\-journal
+Allows \fI\%mongoexport\fP operations to access the durability
+\fIjournal\fP to ensure that the export is in a
+consistent state. This option is only relevant when specifying the
+\fI\%--dbpath\fP option.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-c, \-\-c COLLECTION
-collection to use
+.B \-\-db <db>, \-d <db>
+Use the \fI\%--db\fP option to specify the name of the database
+that contains the collection you want to export.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-f, \-\-fields FIELDS
-comma\-separated list of field names
+.B \-\-collection <collection>, \-c <collection>
+Use the \fI\%--collection\fP option to specify the collection
+that you want \fI\%mongoexport\fP to export.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-fieldFile FILE
-file with fields names \- 1 per line
+.B \-\-fields <field1[,field2]>, \-f <field1[,field2]>
+Specify a field or number fields to \fIinclude\fP in the export. All
+other fields will be \fIexcluded\fP from the export. Comma separate a
+list of fields to limit the fields exported.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-query
-JSON query filter
+.B \-\-fieldFile <file>
+As an alternative to "\fI\%--fields\fP"
+the \fI\%--fieldFile\fP option allows you to specify a file
+(e.g. \fB<file>\(ga\fP) to hold a list of field names to specify a list
+of fields to \fIinclude\fP in the export. All other fields will be
+\fIexcluded\fP from the export. Place one field per line.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-query <JSON>
+Provides a \fIJSON document\fP as a query that optionally limits
+the documents returned in the export.
+.UNINDENT
+.INDENT 0.0
.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 mongoexport page in the MongoDB manual, available at http://dochub.mongodb.org/core/mongoexportmanpage
-.SH "AUTHOR"
-Kristina Chodorow
+Changes the export format to a comma separated values (CSV)
+format. By default \fI\%mongoexport\fP writes data using one
+\fIJSON\fP document for every MongoDB document.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-jsonArray
+Modifies the output of \fI\%mongoexport\fP to write the
+entire contents of the export as a single \fIJSON\fP array. By
+default \fI\%mongoexport\fP writes data using one JSON document
+for every MongoDB document.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-slaveOk, \-k
+Allows \fI\%mongoexport\fP to read data from secondary or slave
+nodes when using \fI\%mongoexport\fP with a replica set. This
+option is only available if connected to a \fBmongod\fP or
+\fBmongos\fP and is not available when used with the
+"\fI\%mongoexport --dbpath\fP" option.
+.sp
+This is the default behavior.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-out <file>, \-o <file>
+Specify a file to write the export to. If you do not specify a file
+name, the \fI\%mongoexport\fP writes data to standard output
+(e.g. \fBstdout\fP).
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-forceTableScan
+New in version 2.2.
+.sp
+Forces \fI\%mongoexport\fP to scan the data store directly:
+typically, \fI\%mongoexport\fP saves entries as they appear in the
+index of the \fB_id\fP field. Use \fI\%--forceTableScan\fP to skip
+the index and scan the data directly. Typically there are two cases
+where this behavior is preferable to the default:
+.INDENT 7.0
+.IP 1. 3
+If you have key sizes over 800 bytes that would not be present
+in the \fB_id\fP index.
+.IP 2. 3
+Your database uses a custom \fB_id\fP field.
+.UNINDENT
+.sp
+When you run with \fI\%--forceTableScan\fP, \fI\%mongoexport\fP
+does not use \fB$snapshot\fP. As a result, the export produced
+by \fI\%mongoexport\fP can reflect the state of the database at
+many different points in time.
+.IP Warning
+Use \fI\%--forceTableScan\fP with extreme caution
+and consideration.
+.RE
+.UNINDENT
+.SH USAGE
+.sp
+In the following example, \fI\%mongoexport\fP exports the
+collection \fBcontacts\fP from the \fBusers\fP database from the
+\fBmongod\fP instance running on the localhost port
+number \fB27017\fP. This command writes the export data in \fICSV\fP
+format into a file located at \fB/opt/backups/contacts.csv\fP.
+.sp
+.nf
+.ft C
+mongoexport \-\-db users \-\-collection contacts \-\-csv \-\-out /opt/backups/contacts.csv
+.ft P
+.fi
+.sp
+The next example creates an export of the collection \fBcontacts\fP
+from the MongoDB instance running on the localhost port number \fB27017\fP,
+with journaling explicitly enabled. This writes the export to the
+\fBcontacts.json\fP file in \fIJSON\fP format.
+.sp
+.nf
+.ft C
+mongoexport \-\-db sales \-\-collection contacts \-\-out contacts.json \-\-journal
+.ft P
+.fi
+.sp
+The following example exports the collection \fBcontacts\fP from the
+\fBsales\fP database located in the MongoDB data files located at
+\fB/srv/mongodb/\fP. This operation writes the export to standard output
+in \fIJSON\fP format.
+.sp
+.nf
+.ft C
+mongoexport \-\-db sales \-\-collection contacts \-\-dbpath /srv/mongodb/
+.ft P
+.fi
+.IP Warning
+The above example will only succeed if there is no \fBmongod\fP
+connected to the data files located in the \fB/srv/mongodb/\fP
+directory.
+.RE
+.sp
+The final example exports the collection \fBcontacts\fP from the
+database \fBmarketing\fP . This data resides on the MongoDB instance
+located on the host \fBmongodb1.example.net\fP running on port
+\fB37017\fP, which requires the username \fBuser\fP and the password
+\fBpass\fP.
+.sp
+.nf
+.ft C
+mongoexport \-\-host mongodb1.example.net \-\-port 37017 \-\-username user \-\-password pass \-\-collection contacts \-\-db marketing \-\-out mdb1\-examplenet.json
+.ft P
+.fi
+.SH AUTHOR
+MongoDB Documentation Project
+.SH COPYRIGHT
+2011-2013, 10gen, Inc.
+.\" Generated by docutils manpage writer.
+.
diff --git a/debian/mongofiles.1 b/debian/mongofiles.1
index 31b99d73ea1..e6b40b1512d 100644
--- a/debian/mongofiles.1
+++ b/debian/mongofiles.1
@@ -1,94 +1,365 @@
-.TH MONGOFILES "1" "June 2009" "10gen" "Mongo Database"
-.SH "NAME"
-mongofiles \- a simple GridFS interface
-.SH "SYNOPSIS"
-\fBmongofiles [\fIOPTIONS\fR] \fICOMMAND\fR \fIFILENAME\fR\fR
-.SH "DESCRIPTION"
-.PP
-\fBmongofiles\fR
-is used to list, get, and insert files in the database.
+.TH "MONGOFILES" "1" "March 14, 2013" "2.2.3" "mongodb-manual"
+.SH NAME
+mongofiles \- MongoDB
+.
+.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
+..
+.\" Man page generated from reStructuredText.
+.
+.SH SYNOPSIS
+.sp
+The \fI\%mongofiles\fP utility makes it possible to manipulate files
+stored in your MongoDB instance in \fIGridFS\fP objects from the
+command line. It is particularly useful as it provides an interface
+between objects stored in your file system and GridFS.
+.sp
+All \fI\%mongofiles\fP commands take arguments in three groups:
+.INDENT 0.0
+.IP 1. 3
+\fI\%Options\fP. You may use one or more of
+these options to control the behavior of \fI\%mongofiles\fP.
+.IP 2. 3
+\fI\%Commands\fP. Use one of these commands to
+determine the action of \fI\%mongofiles\fP.
+.IP 3. 3
+A file name representing either the name of a file on your system\(aqs
+file system, a GridFS object.
+.UNINDENT
+.sp
+\fI\%mongofiles\fP, like \fBmongodump\fP, \fBmongoexport\fP,
+\fBmongoimport\fP, and \fBmongorestore\fP, can access data
+stored in a MongoDB data directory without requiring a running
+\fBmongod\fP instance, if no other \fBmongod\fP is running.
+.IP Note
+For \fIreplica sets\fP, \fI\%mongofiles\fP can
+only read from the set\(aqs \(aq\fIprimary\fP.
+.RE
+.SH COMMANDS
+.INDENT 0.0
.TP
-Commands:
+.B mongofiles
+.UNINDENT
+.INDENT 0.0
.TP
-.B list
-list all files. FILENAME is an optional prefix which listed filenames
-must begin with.
+.B list <prefix>
+Lists the files in the GridFS store. The characters specified after
+\fBlist\fP (e.g. \fB<prefix>\fP) optionally limit the list of
+returned items to files that begin with that string of characters.
+.UNINDENT
+.INDENT 0.0
.TP
-.B search
-search all files. FILENAME is a substring which listed
-filenames must contain.
+.B search <string>
+Lists the files in the GridFS store with names that match any
+portion of \fB<string>\fP.
+.UNINDENT
+.INDENT 0.0
.TP
-.B put
-add a file with filename FILENAME
+.B put <filename>
+Copy the specified file from the local file system into GridFS
+storage.
+.sp
+Here, \fB<filename>\fP refers to the name the object will have in
+GridFS, and \fI\%mongofiles\fP assumes that this reflects the name the
+file has on the local file system. If the local filename is
+different use the \fI\%mongofiles --local\fP option.
+.UNINDENT
+.INDENT 0.0
.TP
-.B get
-get a file with filename FILENAME
+.B get <filename>
+Copy the specified file from GridFS storage to the local file
+system.
+.sp
+Here, \fB<filename>\fP refers to the name the object will have in
+GridFS, and \fI\%mongofiles\fP assumes that this reflects the name the
+file has on the local file system. If the local filename is
+different use the \fI\%mongofiles --local\fP option.
+.UNINDENT
+.INDENT 0.0
.TP
-.B delete
-delete all files with filename FILENAME
-
-.SH "EXAMPLES"
+.B delete <filename>
+Delete the specified file from GridFS storage.
+.UNINDENT
+.SH OPTIONS
+.INDENT 0.0
.TP
-.B mongofiles list
-lists files in test.fs.files
+.B \-\-help
+Returns a basic help and usage text.
+.UNINDENT
+.INDENT 0.0
.TP
-.B mongofiles put README.txt
-inserts the file README.txt into the collection test.fs.files
+.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
+the option multiple times, (e.g. \fB\-vvvvv\fP.)
+.UNINDENT
+.INDENT 0.0
.TP
-.B mongofiles get photo.jpg
-retrieves photo.jpg from test.fs.files and saves it locally
-.SH "OPTIONS"
+.B \-\-version
+Returns the version of the \fI\%mongofiles\fP utility.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-help
-show usage information
+.B \-\-host <hostname><:port>
+Specifies a resolvable hostname for the \fBmongod\fP that
+holds your GridFS system. By default \fI\%mongofiles\fP attempts
+to connect to a MongoDB process ruining on the localhost port
+number \fB27017\fP.
+.sp
+Optionally, specify a port number to connect a MongoDB instance
+running on a port other than 27017.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-version
-show version information
+.B \-\-port <port>
+Specifies the port number, if the MongoDB instance is not running on
+the standard port. (i.e. \fB27017\fP) You may also specify a port
+number using the \fI\%mongofiles --host\fP command.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-v, \-\-verbose
-be more verbose (include multiple times for more verbosity
-e.g. \-vvvvv)
+.B \-\-ipv6
+Enables IPv6 support that allows \fI\%mongofiles\fP to connect
+to the MongoDB instance using an IPv6 network. All MongoDB programs
+and processes, including \fI\%mongofiles\fP, disable IPv6
+support by default.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-h, \-\-host HOST
-server to connect to (default HOST=localhost)
+.B \-\-ssl
+New in version 2.4: MongoDB added support for SSL connections to \fBmongod\fP
+instances in mongofiles.
+.IP Note
+SSL support in mongofiles is not compiled into the default
+distribution of MongoDB. See \fB/administration/ssl\fP for more
+information on SSL and MongoDB.
+.sp
+Additionally, mongofiles does not support connections to
+\fBmongod\fP instances that require client certificate
+validation.
+.RE
+.sp
+Allows \fI\%mongofiles\fP to connect to \fBmongod\fP
+instance over an SSL connection.
+.UNINDENT
+.INDENT 0.0
.TP
-.B\-\-port arg
-server port. Can also use \-\-host hostname:port
+.B \-\-username <username>, \-u <username>
+Specifies a username to authenticate to the MongoDB instance, if your
+database requires authentication. Use in conjunction with the
+\fI\%mongofiles --password\fP option to supply a password.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-ipv6
-enable IPv6 support (disabled by default)
+.B \-\-password <password>, \-p <password>
+Specifies a password to authenticate to the MongoDB instance. Use
+in conjunction with the \fI\%mongofiles --username\fP option to
+supply a username.
+.sp
+If you specify a \fI\%--username\fP
+without the \fI\%--password\fP option, \fI\%mongofiles\fP
+will prompt for a password interactively.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-u|\-\-username USERNAME
-specify user to log in as
+.B \-\-authenticationDatabase <dbname>
+New in version 2.4.
+.sp
+Specifies the database that holds the user\(aqs (e.g
+\fI\%--username\fP) credentials.
+.sp
+By default, \fI\%mongofiles\fP assumes that the database specified to the
+\fI\%--db\fP argument holds the user\(aqs credentials, unless you
+specify \fI\%--authenticationDatabase\fP.
+.sp
+See \fBuserSource\fP,
+\fB/reference/privilege\-documents\fP and
+\fB/reference/user\-privileges\fP for more information about
+delegated authentication in MongoDB.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-p|\-\-password PASSWORD
-specify password of user
+.B \-\-authenticationMechanism <name>
+New in version 2.4.
+.sp
+Specifies the authentication mechanism. By default, the
+authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB
+challenge/response authentication mechanism. In the MongoDB Subscriber Edition,
+\fI\%mongofiles\fP also includes support for \fBGSSAPI\fP to handle
+Kerberos authentication.
+.sp
+See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP
+for more information about Kerberos authentication.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-dbpath PATH
-directly access mongod data files in this path, instead of connecting to a mongod instance
+.B \-\-dbpath <path>
+Specifies the directory of the MongoDB data files. If used, the
+\fI\%--dbpath\fP option enables \fI\%mongofiles\fP to attach directly to
+local data files interact with the GridFS data without the
+\fBmongod\fP. To run with \fI\%--dbpath\fP, \fI\%mongofiles\fP needs to lock
+access to the data directory: as a result, no \fBmongod\fP can access
+the same path while the process runs.
+.UNINDENT
+.INDENT 0.0
.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 (some commands, default COLLECTION=fs.files)
-.TP
-.B \-l, \-\-local FILENAME
-local filename for put|get (default is to use the same name as the
-FILENAME)
-.TP
-.B \-t, \-\-type arg
-MIME type for put (default is to omit)
-.TP
-.B \-r, \-\-replace
-Remove other files with the same name after PUT
-.SH "COPYRIGHT"
-.PP
-Copyright 2007\-2011 10gen
-.SH "SEE ALSO"
-For more information, please refer to the mongofiles page in the MongoDB manual, available at http://dochub.mongodb.org/core/mongofilesmanpage
-.SH "AUTHOR"
-Kristina Chodorow
+Use the \fI\%--directoryperdb\fP in conjunction with the corresponding
+option to \fBmongod\fP, which allows \fI\%mongofiles\fP when
+running with the \fI\%--dbpath\fP option and MongoDB uses an
+on\-disk format where every database has a distinct
+directory. This option is only relevant when specifying the
+\fI\%--dbpath\fP option.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-journal
+Allows \fI\%mongofiles\fP operations to use the durability
+\fIjournal\fP when running with \fI\%--dbpath\fP
+to ensure that the database maintains a recoverable state. This
+forces \fI\%mongofiles\fP to record all data on disk regularly.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-db <db>, \-d <db>
+Use the \fI\%--db\fP option to specify the MongoDB database that stores
+or will store the GridFS files.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-collection <collection>, \-c <collection>
+This option has no use in this context and a future release may
+remove it. See \fI\%SERVER-4931\fP for more information.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-local <filename>, \-l <filename>
+Specifies the local filesystem name of a file for get and put
+operations.
+.sp
+In the \fBmongofiles put\fP and \fBmongofiles get\fP
+commands the required \fB<filename>\fP modifier refers to the name
+the object will have in GridFS. \fI\%mongofiles\fP assumes that
+this reflects the file\(aqs name on the local file
+system. This setting overrides this default.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-type <MIME>, t <MIME>
+Provides the ability to specify a \fIMIME\fP type to describe the
+file inserted into GridFS storage. \fI\%mongofiles\fP omits this
+option in the default operation.
+.sp
+Use only with \fBmongofiles put\fP operations.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-replace, \-r
+Alters the behavior of \fBmongofiles put\fP to replace
+existing GridFS objects with the specified local file, rather than
+adding an additional object with the same name.
+.sp
+In the default operation, files will not be overwritten by a
+\fBmongofiles put\fP option.
+.UNINDENT
+.SH USE
+.sp
+To return a list of all files in a \fIGridFS\fP collection in the
+\fBrecords\fP database, use the following invocation at the system shell:
+.sp
+.nf
+.ft C
+mongofiles \-d records list
+.ft P
+.fi
+.sp
+This \fI\%mongofiles\fP instance will connect to the
+\fBmongod\fP instance running on the \fB27017\fP localhost
+interface to specify the same operation on a different port or
+hostname, and issue a command that resembles one of the following:
+.sp
+.nf
+.ft C
+mongofiles \-\-port 37017 \-d records list
+mongofiles \-\-hostname db1.example.net \-d records list
+mongofiles \-\-hostname db1.example.net \-\-port 37017 \-d records list
+.ft P
+.fi
+.sp
+Modify any of the following commands as needed if you\(aqre connecting
+the \fBmongod\fP instances on different ports or hosts.
+.sp
+To upload a file named \fB32\-corinth.lp\fP to the GridFS collection in
+the \fBrecords\fP database, you can use the following command:
+.sp
+.nf
+.ft C
+mongofiles \-d records put 32\-corinth.lp
+.ft P
+.fi
+.sp
+To delete the \fB32\-corinth.lp\fP file from this GridFS collection in
+the \fBrecords\fP database, you can use the following command:
+.sp
+.nf
+.ft C
+mongofiles \-d records delete 32\-corinth.lp
+.ft P
+.fi
+.sp
+To search for files in the GridFS collection in the \fBrecords\fP
+database that have the string \fBcorinth\fP in their names, you can use
+following command:
+.sp
+.nf
+.ft C
+mongofiles \-d records search corinth
+.ft P
+.fi
+.sp
+To list all files in the GridFS collection in the \fBrecords\fP database
+that begin with the string \fB32\fP, you can use the following command:
+.sp
+.nf
+.ft C
+mongofiles \-d records list 32
+.ft P
+.fi
+.sp
+To fetch the file from the GridFS collection in the \fBrecords\fP
+database named \fB32\-corinth.lp\fP, you can use the following command:
+.sp
+.nf
+.ft C
+mongofiles \-d records get 32\-corinth.lp
+.ft P
+.fi
+.SH AUTHOR
+MongoDB Documentation Project
+.SH COPYRIGHT
+2011-2013, 10gen, Inc.
+.\" Generated by docutils manpage writer.
+.
diff --git a/debian/mongoimport.1 b/debian/mongoimport.1
index 15d6fc7ee36..22313c05cc6 100644
--- a/debian/mongoimport.1
+++ b/debian/mongoimport.1
@@ -1,92 +1,379 @@
-.TH MONGOIMPORT "1" "January 2010" "10gen" "Mongo Database"
-.SH "NAME"
-mongoimport \- the Mongo import tool
-.SH "SYNOPSIS"
-\fBmongoimport [\fIOPTIONS\fR]\fR
-.SH "DESCRIPTION"
-.PP
-\fBmongoimport\fR
-is a tool to import a MongoDB collection from JSON, CSV, or TSV. The query can be filtered or a list of fields to input can be given.
-.\".SH "EXAMPLES"
-.\".TP
-.\".B mongoimport -d test -c test1 --csv -f "name,num"
-.\"import documents from test.test1 in CSV format
-.SH "OPTIONS"
+.TH "MONGOIMPORT" "1" "March 14, 2013" "2.2.3" "mongodb-manual"
+.SH NAME
+mongoimport \- MongoDB
+.
+.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
+..
+.\" Man page generated from reStructuredText.
+.
+.SH SYNOPSIS
+.sp
+The \fI\%mongoimport\fP tool provides a route to import content from a
+JSON, CSV, or TSV export created by \fBmongoexport\fP, or
+potentially, another third\-party export tool. See the
+"\fB/administration/import\-export\fP" document for a more in depth
+usage overview, and the "\fBmongoexport\fP" document for more
+information regarding \fBmongoexport\fP, which
+provides the inverse "importing" capability.
+.IP Note
+Do not use \fI\%mongoimport\fP and \fBmongoexport\fP for
+full instance, production backups because they will not reliably capture data type
+information. Use \fBmongodump\fP and \fBmongorestore\fP as
+described in "\fB/administration/backups\fP" for this kind of
+functionality.
+.RE
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B mongoimport
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-help
-show usage information
+Returns a basic help and usage text.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-version
-show version information
+.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
+the option multiple times, (e.g. \fB\-vvvvv\fP.)
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-v, \-\-verbose
-be more verbose (include multiple times for more verbosity
-e.g. \-vvvvv)
+.B \-\-version
+Returns the version of the \fI\%mongoimport\fP program.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-h, \-\-host HOST
-server to connect to (default HOST=localhost)
+.B \-\-host <hostname><:port>, \-h
+Specifies a resolvable hostname for the \fBmongod\fP to which
+you want to restore the database. By default \fI\%mongoimport\fP
+will attempt to connect to a MongoDB process ruining on the
+localhost port numbered \fB27017\fP.
+.sp
+Optionally, specify a port number to connect a MongoDB instance
+running on a port other than \fB27017\fP.
+.sp
+To connect to a replica set, use the \fI\%--host\fP argument with a
+setname, followed by a slash and a comma\-separated list of host and
+port names. \fI\%mongoimport\fP will, given the seed of at least
+one connected set member, connect to primary node of that set. This
+option would resemble:
+.sp
+.nf
+.ft C
+\-\-host repl0/mongo0.example.net,mongo0.example.net:27018,mongo1.example.net,mongo2.example.net
+.ft P
+.fi
+.sp
+You can always connect directly to a single MongoDB instance by
+specifying the host and port number directly.
+.UNINDENT
+.INDENT 0.0
.TP
-.B\-\-port arg
-server port. Can also use \-\-host hostname:port
+.B \-\-port <port>
+Specifies the port number, if the MongoDB instance is not running on
+the standard port. (i.e. \fB27017\fP) You may also specify a port
+number using the \fI\%mongoimport --host\fP command.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-ipv6
-enable IPv6 support (disabled by default)
+Enables IPv6 support that allows \fI\%mongoimport\fP to connect
+to the MongoDB instance using an IPv6 network. All MongoDB programs
+and processes, including \fI\%mongoimport\fP, disable IPv6
+support by default.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-ssl
+New in version 2.4: MongoDB added support for SSL connections to \fBmongod\fP
+instances in mongoimport.
+.IP Note
+SSL support in mongoimport is not compiled into the default
+distribution of MongoDB. See \fB/administration/ssl\fP for more
+information on SSL and MongoDB.
+.sp
+Additionally, mongoimport does not support connections to
+\fBmongod\fP instances that require client certificate
+validation.
+.RE
+.sp
+Allows \fI\%mongoimport\fP to connect to \fBmongod\fP
+instance over an SSL connection.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-u|\-\-username USERNAME
-specify user to log in as
+.B \-\-username <username>, \-u <username>
+Specifies a username to authenticate to the MongoDB instance, if your
+database requires authentication. Use in conjunction with the
+\fI\%mongoimport --password\fP option to supply a password.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-p|\-\-password PASSWORD
-specify password of user
+.B \-\-password <password>, \-p <password>
+Specifies a password to authenticate to the MongoDB instance. Use
+in conjunction with the \fI\%mongoimport --username\fP option to
+supply a username.
+.sp
+If you specify a \fI\%--username\fP
+without the \fI\%--password\fP option, \fI\%mongoimport\fP
+will prompt for a password interactively.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-dbpath PATH
-directly access mongod data files in this path, instead of connecting to a mongod instance
+.B \-\-authenticationDatabase <dbname>
+New in version 2.4.
+.sp
+Specifies the database that holds the user\(aqs (e.g
+\fI\%--username\fP) credentials.
+.sp
+By default, \fI\%mongoimport\fP assumes that the database specified to the
+\fI\%--db\fP argument holds the user\(aqs credentials, unless you
+specify \fI\%--authenticationDatabase\fP.
+.sp
+See \fBuserSource\fP,
+\fB/reference/privilege\-documents\fP and
+\fB/reference/user\-privileges\fP for more information about
+delegated authentication in MongoDB.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-authenticationMechanism <name>
+New in version 2.4.
+.sp
+Specifies the authentication mechanism. By default, the
+authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB
+challenge/response authentication mechanism. In the MongoDB Subscriber Edition,
+\fI\%mongoimport\fP also includes support for \fBGSSAPI\fP to handle
+Kerberos authentication.
+.sp
+See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP
+for more information about Kerberos authentication.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-dbpath <path>
+Specifies the directory of the MongoDB data files. If used, the
+\fI\%--dbpath\fP option enables
+\fI\%mongoimport\fP to attach directly to local data files and
+insert the data without the \fBmongod\fP. To run with
+\fB\-\-dbpath\fP, \fI\%mongoimport\fP needs to lock access to the
+data directory: as a result, no \fBmongod\fP can access the
+same path while the process runs.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-directoryperdb
-if dbpath specified, each db is in a separate directory
+Use the \fI\%--directoryperdb\fP in conjunction with the
+corresponding option to \fBmongod\fP, which allows
+\fI\%mongoimport\fP to import data into MongoDB instances that
+have every database\(aqs files saved in discrete directories on the
+disk. This option is only relevant when specifying the
+\fI\%--dbpath\fP option.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-journal
+Allows \fBmongoexport\fP write to the durability
+\fIjournal\fP to ensure that the data files will remain in a
+consistent state during the write process. This option is only
+relevant when specifying the \fI\%--dbpath\fP option.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-d, \-\-db DATABASE
-database to use
+.B \-\-db <db>, \-d <db>
+Use the \fI\%--db\fP option to specify a database for
+\fI\%mongoimport\fP to restore data. If you do not specify a
+\fB<db>\fP, \fI\%mongoimport\fP creates new databases that
+correspond to the databases where data originated and data may be
+overwritten. Use this option to restore data into a MongoDB
+instance that already has data, or to restore only some data in the
+specified backup.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-c, \-\-c COLLECTION
-collection to use
+.B \-\-collection <collection>, \-c <collection>
+Use the \fI\%--collection\fP option to specify a collection for
+\fBmongorestore\fP to restore. If you do not specify a
+\fB<collection>\fP, \fI\%mongoimport\fP imports all collections
+created. Existing data may be overwritten. Use this option to
+restore data into a MongoDB instance that already has data, or to
+restore only some data in the specified imported data set.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-f, \-\-fields FIELDS
-comma\-separated list of field names
+.B \-\-fields <field1<,filed2>>, \-f <field1[,filed2]>
+Specify a comma seperatedlist of field names when importing
+\fIcsv\fP or \fItsv\fP files that do not have field names in
+the first (i.e. header) line of the file.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-fieldFile FILE
-file with fields names \- 1 per line
+.B \-\-fieldFile <filename>
+As an alternative to \fI\%--fields\fP the \fI\%--fieldFile\fP
+option allows you to specify a file (e.g. \fB<file>\(ga\fP) to that
+holds a list of field names if your \fIcsv\fP or \fItsv\fP
+file does not include field names in the first (i.e. header) line
+of the file. Place one field per line.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-ignoreBlanks
-if given, empty fields in csv and tsv will be ignored
+In \fIcsv\fP and \fItsv\fP exports, ignore empty fields. If not
+specified, \fI\%mongoimport\fP creates fields without values in
+imported documents.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-type TYPE
-type of file to import. default: json (json,csv,tsv)
+.B \-\-type <json|csv|tsv>
+Declare the type of export format to import. The default format is
+\fIJSON\fP, but it\(aqs possible to import \fIcsv\fP and
+\fItsv\fP files.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-file FILE
-file to import from; if not specified stdin is used
+.B \-\-file <filename>
+Specify the location of a file containing the data to
+import. \fI\%mongoimport\fP will read data from standard input
+(e.g. "stdin.") if you do not specify a file.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-drop
-drop collection first
+Modifies the importation procedure so that the target instance
+drops every collection before restoring the collection from the
+dumped backup.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-headerline
-CSV,TSV only \- use first line as headers
+If using "\fI\%--type csv\fP" or
+"\fI\%--type tsv\fP," use the first line as
+field names. Otherwise, \fI\%mongoimport\fP will import the first
+line as a distinct document.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-upsert
-insert or update objects that already exist
+Modifies the import process to update existing objects in the
+database if they match an imported object, while inserting all
+other objects.
+.sp
+If you do not specify a field or fields using the
+\fI\%--upsertFields\fP \fI\%mongoimport\fP will upsert on the
+basis of the \fB_id\fP field.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-upsertFields ARG
-comma-separated fields for the query part of the upsert. You should
-make sure this is indexed
+.B \-\-upsertFields <field1[,field2]>
+Specifies a list of fields for the query portion of the
+\fIupsert\fP. Use this option if the \fB_id\fP fields in the
+existing documents don\(aqt match the field in the document, but
+another field or field combination can uniquely identify
+documents as a basis for performing upsert operations.
+.sp
+To ensure adequate performance, indexes should exist for this
+field or fields.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-stopOnError
-stop importing at first error rather than continuing
+New in version 2.2.
+.sp
+Forces \fI\%mongoimport\fP to halt the import operation at the
+first error rather than continuing the operation despite errors.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-jsonArray
-load a json array, not one item per line. Currently limited to 16MB.
-.SH "COPYRIGHT"
-.PP
-Copyright 2007\-2011 10gen
-.SH "SEE ALSO"
-For more information, please refer to the mongoimport page in the MongoDB manual, available at http://dochub.mongodb.org/core/mongoimportmanpage
-.SH "AUTHOR"
-Kristina Chodorow
+Changed in version 2.2: The limit on document size increased from 4MB to 16MB.
+.sp
+Accept import of data expressed with multiple MongoDB document
+within a single \fIJSON\fP array.
+.sp
+Use in conjunction with \fImongoexport \-\-jsonArray\fP to
+import data written as a single \fIJSON\fP array. Limited to
+imports of 16 MB or smaller.
+.UNINDENT
+.SH USAGE
+.sp
+In this example, \fI\%mongoimport\fP imports the \fIcsv\fP
+formatted data in the \fB/opt/backups/contacts.csv\fP into the
+collection \fBcontacts\fP in the \fBusers\fP database on the MongoDB
+instance running on the localhost port numbered \fB27017\fP.
+.sp
+.nf
+.ft C
+mongoimport \-\-db users \-\-collection contacts \-\-type csv \-\-file /opt/backups/contacts.csv
+.ft P
+.fi
+.sp
+In the following example, \fI\%mongoimport\fP imports the data in
+the \fIJSON\fP formatted file \fBcontacts.json\fP into the collection
+\fBcontacts\fP on the MongoDB instance running on the localhost port
+number 27017. Journaling is explicitly enabled.
+.sp
+.nf
+.ft C
+mongoimport \-\-collection contacts \-\-file contacts.json \-\-journal
+.ft P
+.fi
+.sp
+In the next example, \fI\%mongoimport\fP takes data passed to it on
+standard input (i.e. with a \fB|\fP pipe.) and imports it into the
+collection \fBcontacts\fP in the \fBsales\fP database is the
+MongoDB datafiles located at \fB/srv/mongodb/\fP. if the import process
+encounters an error, the \fI\%mongoimport\fP will halt because of
+the \fI\%--stopOnError\fP option.
+.sp
+.nf
+.ft C
+mongoimport \-\-db sales \-\-collection contacts \-\-stopOnError \-\-dbpath /srv/mongodb/
+.ft P
+.fi
+.sp
+In the final example, \fI\%mongoimport\fP imports data from the
+file \fB/opt/backups/mdb1\-examplenet.json\fP into the collection
+\fBcontacts\fP within the database \fBmarketing\fP on a remote MongoDB
+database. This \fI\%mongoimport\fP accesses the \fBmongod\fP
+instance running on the host \fBmongodb1.example.net\fP over port
+\fB37017\fP, which requires the username \fBuser\fP and the password
+\fBpass\fP.
+.sp
+.nf
+.ft C
+mongoimport \-\-host mongodb1.example.net \-\-port 37017 \-\-username user \-\-password pass \-\-collection contacts \-\-db marketing \-\-file /opt/backups/mdb1\-examplenet.json
+.ft P
+.fi
+.SH AUTHOR
+MongoDB Documentation Project
+.SH COPYRIGHT
+2011-2013, 10gen, Inc.
+.\" Generated by docutils manpage writer.
+.
diff --git a/debian/mongooplog.1 b/debian/mongooplog.1
new file mode 100755
index 00000000000..c6e2e27866e
--- /dev/null
+++ b/debian/mongooplog.1
@@ -0,0 +1,346 @@
+.TH "MONGOOPLOG" "1" "March 14, 2013" "2.2.3" "mongodb-manual"
+.SH NAME
+mongooplog \- MongoDB
+.
+.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
+..
+.\" Man page generated from reStructuredText.
+.
+.sp
+New in version 2.2.
+.SH SYNOPSIS
+.sp
+\fI\%mongooplog\fP is a simple tool that polls operations from
+the \fIreplication\fP \fIoplog\fP of a remote server, and applies
+them to the local server. This capability supports certain classes of
+real\-time migrations that require that the source server remain online
+and in operation throughout the migration process.
+.sp
+Typically this command will take the following form:
+.sp
+.nf
+.ft C
+mongooplog \-\-from mongodb0.example.net \-\-host mongodb1.example.net
+.ft P
+.fi
+.sp
+This command copies oplog entries from the \fBmongod\fP instance
+running on the host \fBmongodb0.example.net\fP and duplicates
+operations to the host \fBmongodb1.example.net\fP. If you do not need
+to keep the \fI\%--from\fP host running during
+the migration, consider using \fBmongodump\fP and
+\fBmongorestore\fP or another \fBbackup\fP operation, which may be better suited to
+your operation.
+.IP Note
+If the \fBmongod\fP instance specified by the \fI\%--from\fP
+argument is running with \fBauthentication\fP, then
+\fI\%mongooplog\fP will not be able to copy oplog entries.
+.RE
+.IP "See also"
+.sp
+\fBmongodump\fP, \fBmongorestore\fP,
+"\fB/administration/backups\fP", "\fIOplog Internals Overview\fP", and "\fIReplica Set Oplog Sizing\fP".
+.RE
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B mongooplog
+.UNINDENT
+.INDENT 0.0
+.TP
+.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 the
+option multiple times, (e.g. \fB\-vvvvv\fP.)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-version
+Returns the version of the \fI\%mongooplog\fP utility.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-host <hostname><:port>, \-h
+Specifies a resolvable hostname for the \fBmongod\fP instance
+to which \fI\%mongooplog\fP will apply \fIoplog\fP operations
+retrieved from the serve specified by the \fI\%--from\fP
+option.
+.sp
+\fI\%mongooplog\fP assumes that all target \fBmongod\fP
+instances are accessible by way of port \fB27017\fP. You may,
+optionally, declare an alternate port number as part of the
+hostname argument.
+.sp
+You can always connect directly to a single \fBmongod\fP
+instance by specifying the host and port number directly.
+.sp
+To connect to a replica set, you can specify the replica set seed
+name, and a seed list of set members, in the following format:
+.sp
+.nf
+.ft C
+<replica_set_name>/<hostname1><:port>,<hostname2:<port>,...
+.ft P
+.fi
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-port
+Specifies the port number of the \fBmongod\fP instance where
+\fI\%mongooplog\fP will apply \fIoplog\fP entries. Only
+specify this option if the MongoDB instance that you wish to
+connect to is not running on the standard port. (i.e. \fB27017\fP)
+You may also specify a port number using the \fI\%--host\fP command.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-ipv6
+Enables IPv6 support that allows \fI\%mongooplog\fP to connect
+to the MongoDB instance using an IPv6 network. All MongoDB programs
+and processes, including \fI\%mongooplog\fP, disable IPv6
+support by default.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-ssl
+New in version 2.4: MongoDB added support for SSL connections to \fBmongod\fP
+instances in mongooplog.
+.IP Note
+SSL support in mongooplog is not compiled into the default
+distribution of MongoDB. See \fB/administration/ssl\fP for more
+information on SSL and MongoDB.
+.sp
+Additionally, mongooplog does not support connections to
+\fBmongod\fP instances that require client certificate
+validation.
+.RE
+.sp
+Allows \fI\%mongooplog\fP to connect to \fBmongod\fP
+instance over an SSL connection.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-username <username>, \-u <username>
+Specifies a username to authenticate to the MongoDB instance, if
+your database requires authentication. Use in conjunction with the
+\fI\%--password\fP option to supply a
+password.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-password <password>, \-p <password>
+Specifies a password to authenticate to the MongoDB instance. Use
+in conjunction with the \fI\%--username\fP
+option to supply a username.
+.sp
+If you specify a \fI\%--username\fP
+without the \fI\%--password\fP option, \fI\%mongooplog\fP will
+prompt for a password interactively.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-authenticationDatabase <dbname>
+New in version 2.4.
+.sp
+Specifies the database that holds the user\(aqs (e.g
+\fI\%--username\fP) credentials.
+.sp
+By default, \fI\%mongooplog\fP assumes that the database specified to the
+\fI\-\-db\fP argument holds the user\(aqs credentials, unless you
+specify \fI\%--authenticationDatabase\fP.
+.sp
+See \fBuserSource\fP,
+\fB/reference/privilege\-documents\fP and
+\fB/reference/user\-privileges\fP for more information about
+delegated authentication in MongoDB.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-authenticationMechanism <name>
+New in version 2.4.
+.sp
+Specifies the authentication mechanism. By default, the
+authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB
+challenge/response authentication mechanism. In the MongoDB Subscriber Edition,
+\fI\%mongooplog\fP also includes support for \fBGSSAPI\fP to handle
+Kerberos authentication.
+.sp
+See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP
+for more information about Kerberos authentication.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-dbpath <path>
+Specifies a directory, containing MongoDB data files, to which
+\fI\%mongooplog\fP will apply operations from the \fIoplog\fP
+of the database specified with the \fI\%--from\fP
+option. When used, the \fI\%--dbpath\fP option enables
+\fBmongo\fP to attach directly to local data files and write
+data without a running \fBmongod\fP instance. To run with
+\fI\%--dbpath\fP, \fI\%mongooplog\fP needs to restrict access
+to the data directory: as a result, no \fBmongod\fP can be
+access the same path while the process runs.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-directoryperdb
+Use the \fI\%--directoryperdb\fP in conjunction with the
+corresponding option to \fBmongod\fP. This option allows
+\fI\%mongooplog\fP to write to data files organized with each
+database located in a distinct directory. This option is only
+relevant when specifying the \fI\%--dbpath\fP option.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-journal
+Allows \fI\%mongooplog\fP operations to use the durability
+\fIjournal\fP to ensure that the data files will
+remain in a consistent state during the writing process. This
+option is only relevant when specifying the \fI\%--dbpath\fP
+option.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-fields [field1[,field2]], \-f [field1[,field2]]
+Specify a field or number fields to constrain which data
+\fI\%mongooplog\fP will migrate. All other fields will be
+\fIexcluded\fP from the migration. Comma separate a list of fields to
+limit the applied fields.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-fieldFile <file>
+As an alternative to "\fI\%--fields\fP" the
+\fI\%--fieldFile\fP option allows you to specify a file
+(e.g. \fB<file>\fP) that holds a list of field names to \fIinclude\fP in
+the migration. All other fields will be \fIexcluded\fP from the
+migration. Place one field per line.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-seconds <number>, \-s <number>
+Specify a number of seconds of operations for \fI\%mongooplog\fP
+to pull from the \fI\%remote host\fP. Unless
+specified the default value is \fB86400\fP seconds, or 24 hours.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-from <host[:port]>
+Specify the host for \fI\%mongooplog\fP to retrieve \fIoplog\fP
+operations from. \fI\%mongooplog\fP \fIrequires\fP this
+option.
+.sp
+Unless you specify the \fI\%--host\fP option,
+\fI\%mongooplog\fP will apply the operations collected with this
+option to the oplog of the \fBmongod\fP instance running on
+the localhost interface connected to port \fB27017\fP.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-oplogns <namespace>
+Specify a namespace in the \fI\%--from\fP
+host where the oplog resides. The default value is
+\fBlocal.oplog.rs\fP, which is the where \fIreplica set\fP members
+store their operation log. However, if you\(aqve copied \fIoplog\fP
+entries into another database or collection, use this option to
+copy oplog entries stored in another location.
+.sp
+\fINamespaces\fP take the form of
+\fB[database].[collection]\fP.
+.UNINDENT
+.SS Usage
+.sp
+Consider the following prototype \fI\%mongooplog\fP command:
+.sp
+.nf
+.ft C
+mongooplog \-\-from mongodb0.example.net \-\-host mongodb1.example.net
+.ft P
+.fi
+.sp
+Here, entries from the \fIoplog\fP of the \fBmongod\fP running
+on port \fB27017\fP. This only pull entries from the last 24 hours.
+.sp
+In the next command, the parameters limit this operation to only apply
+operations to the database \fBpeople\fP in the collection \fBusage\fP on
+the target host (i.e. \fBmongodb1.example.net\fP):
+.sp
+.nf
+.ft C
+mongooplog \-\-from mongodb0.example.net \-\-host mongodb1.example.net \-\-database people \-\-collection usage
+.ft P
+.fi
+.sp
+This operation only applies oplog entries from the last 24 hours. Use
+the \fI\%--seconds\fP argument to capture a
+greater or smaller amount of time. Consider the following example:
+.sp
+.nf
+.ft C
+mongooplog \-\-from mongodb0.example.net \-\-seconds 172800
+.ft P
+.fi
+.sp
+In this operation, \fI\%mongooplog\fP captures 2 full days of
+operations. To migrate 12 hours of \fIoplog\fP entries, use the
+following form:
+.sp
+.nf
+.ft C
+mongooplog \-\-from mongodb0.example.net \-\-seconds 43200
+.ft P
+.fi
+.sp
+For the previous two examples, \fI\%mongooplog\fP migrates entries
+to the \fBmongod\fP process running on the localhost interface
+connected to the \fB27017\fP port. \fI\%mongooplog\fP can also
+operate directly on MongoDB\(aqs data files if no \fBmongod\fP is
+running on the \fItarget\fP host. Consider the following example:
+.sp
+.nf
+.ft C
+mongooplog \-\-from mongodb0.example.net \-\-dbpath /srv/mongodb \-\-journal
+.ft P
+.fi
+.sp
+Here, \fI\%mongooplog\fP imports \fIoplog\fP operations from the
+\fBmongod\fP host connected to port \fB27017\fP. This migrates
+operations to the MongoDB data files stored in the \fB/srv/mongodb\fP
+directory. Additionally \fI\%mongooplog\fP will use the durability
+\fIjournal\fP to ensure that the data files remain in a consistent
+state.
+.SH AUTHOR
+MongoDB Documentation Project
+.SH COPYRIGHT
+2011-2013, 10gen, Inc.
+.\" Generated by docutils manpage writer.
+.
diff --git a/debian/mongoperf.1 b/debian/mongoperf.1
new file mode 100755
index 00000000000..8404a263c7d
--- /dev/null
+++ b/debian/mongoperf.1
@@ -0,0 +1,245 @@
+.TH "MONGOPERF" "1" "March 14, 2013" "2.2.3" "mongodb-manual"
+.SH NAME
+mongoperf \- MongoDB
+.
+.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
+..
+.\" Man page generated from reStructuredText.
+.
+.SH SYNOPSIS
+.sp
+\fI\%mongoperf\fP is a utility to check disk I/O performance
+independently of MongoDB.
+.sp
+It times tests of random disk I/O and presents the results. You can
+use \fI\%mongoperf\fP for any case apart from MongoDB. The
+\fI\%mmf\fP \fBtrue\fP mode is completely generic. In
+that mode is it somewhat analogous to tools such as \fI\%bonnie++\fP (albeit mongoperf is
+simpler).
+.sp
+Specify options to \fI\%mongoperf\fP using a JavaScript document.
+.IP "See also"
+.INDENT 0.0
+.IP \(bu 2
+\fI\%bonnie\fP
+.IP \(bu 2
+\fI\%bonnie++\fP
+.IP \(bu 2
+\fI\%Output from an example run\fP
+.IP \(bu 2
+\fI\%Checking Disk Performance with the mongoperf Utility\fP
+.UNINDENT
+.RE
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B mongoperf
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-help
+Displays the options to \fI\%mongoperf\fP. Specify options to
+\fI\%mongoperf\fP with a JSON document described in the
+\fI\%Configuration Fields\fP section.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B <jsonconfig>
+\fI\%mongoperf\fP accepts configuration options in the form of a
+file that holds a \fIJSON\fP document. You must stream the
+content of this file into \fI\%mongoperf\fP, as in the following
+operation:
+.sp
+.nf
+.ft C
+mongoperf < config
+.ft P
+.fi
+.sp
+In this example \fBconfig\fP is the name of a file that holds a JSON
+document that resembles the following example:
+.sp
+.nf
+.ft C
+{
+ nThreads:<n>,
+ fileSizeMB:<n>,
+ sleepMicros:<n>,
+ mmf:<bool>,
+ r:<bool>,
+ w:<bool>,
+ recSizeKB:<n>,
+ syncDelay:<n>
+}
+.ft P
+.fi
+.sp
+See the \fI\%Configuration Fields\fP section for documentation of each
+of these fields.
+.UNINDENT
+.SH CONFIGURATION FIELDS
+.INDENT 0.0
+.TP
+.B mongoperf.nThreads
+\fIType:\fP Integer.
+.sp
+\fIDefault:\fP 1
+.sp
+Defines the number of threads \fI\%mongoperf\fP will use in the
+test. To saturate your system\(aqs storage system you will need
+multiple threads. Consider setting \fI\%nThreads\fP to \fB16\fP.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B mongoperf.fileSizeMB
+\fIType:\fP Integer.
+.sp
+\fIDefault:\fP 1 megabyte (i.e. 1024\s-2\u2\d\s0 bytes)
+.sp
+Test file size.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B mongoperf.sleepMicros
+\fIType:\fP Integer.
+.sp
+\fIDefault:\fP 0
+.sp
+\fI\%mongoperf\fP will pause for the number of specified
+\fI\%sleepMicros\fP divided by the
+\fI\%nThreads\fP between each operation.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B mongoperf.mmf
+\fIType:\fP Boolean.
+.sp
+\fIDefault:\fP \fBfalse\fP
+.sp
+Set \fI\%mmf\fP to \fBtrue\fP to use memory mapped
+files for the tests.
+.sp
+Generally:
+.INDENT 7.0
+.IP \(bu 2
+when \fI\%mmf\fP is \fBfalse\fP, \fI\%mongoperf\fP
+tests direct, physical, I/O, without caching. Use a large file
+size to test heavy random I/O load and to avoid I/O coalescing.
+.IP \(bu 2
+when \fI\%mmf\fP is \fBtrue\fP, \fI\%mongoperf\fP
+runs tests of the caching system, and can use normal file system
+cache. Use \fBmmf\fP in this mode to test file system cache
+behavior with memory mapped files.
+.UNINDENT
+.UNINDENT
+.INDENT 0.0
+.TP
+.B mongoperf.r
+\fIType:\fP Boolean.
+.sp
+\fIDefault:\fP \fBfalse\fP
+.sp
+Set \fI\%r\fP to \fBtrue\fP to perform reads as part of
+the tests.
+.sp
+Either \fI\%r\fP or \fI\%w\fP must be \fBtrue\fP.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B mongoperf.w
+\fIType:\fP Boolean.
+.sp
+\fIDefault:\fP \fBfalse\fP
+.sp
+Set \fI\%w\fP to \fBtrue\fP to perform writes as part of
+the tests.
+.sp
+Either \fI\%r\fP or \fI\%w\fP must be \fBtrue\fP.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B mongoperf.syncDelay
+\fIType:\fP Integer.
+.sp
+\fIDefault:\fP 0
+.sp
+Seconds between disk flushes. \fI\%syncDelay\fP is
+similar to \fBsyncDelay\fP for \fBmongod\fP.
+.sp
+The \fI\%syncDelay\fP controls how frequently
+\fI\%mongoperf\fP performs an asynchronous disk flush the memory
+mapped file used for testing. By default, \fBmongod\fP
+performs this operation every every 60 seconds. Use
+\fI\%syncDelay\fP to test basic system performance of
+this type of operation.
+.sp
+Only use \fI\%syncDelay\fP in conjunction with
+\fI\%mmf\fP set to \fBtrue\fP.
+.sp
+The default value of \fB0\fP disables this
+.UNINDENT
+.SH USE
+.sp
+.nf
+.ft C
+mongoperf < jsonconfigfile
+.ft P
+.fi
+.sp
+Replace \fBjsonconfigfile\fP with the path to the \fI\%mongoperf\fP
+configuration. You may also invoke \fI\%mongoperf\fP in the
+following form:
+.sp
+.nf
+.ft C
+echo "{nThreads:16,fileSizeMB:1000,r:true}" | ./mongoperf
+.ft P
+.fi
+.sp
+In this operation:
+.INDENT 0.0
+.IP \(bu 2
+\fI\%mongoperf\fP tests direct physical random read io\(aqs, using
+16 concurrent reader threads.
+.IP \(bu 2
+\fI\%mongoperf\fP uses a 1 gigabyte test file.
+.UNINDENT
+.sp
+Consider using \fBiostat\fP, as invoked in the following example to
+monitor I/O performance during the test.
+.sp
+.nf
+.ft C
+iostat \-xm 2
+.ft P
+.fi
+.SH AUTHOR
+MongoDB Documentation Project
+.SH COPYRIGHT
+2011-2013, 10gen, Inc.
+.\" Generated by docutils manpage writer.
+.
diff --git a/debian/mongorestore.1 b/debian/mongorestore.1
index 62eca0c1dc3..730bb32e55e 100644
--- a/debian/mongorestore.1
+++ b/debian/mongorestore.1
@@ -1,62 +1,395 @@
-.TH MONGORESTORE "1" "June 2009" "10gen" "Mongo Database"
-.SH "NAME"
-mongorestore \- the Mongo restoration tool
-.SH "SYNOPSIS"
-\fBmongorestore [\fIOPTIONS\fR]\fR
-.SH "DESCRIPTION"
-.PP
-\fBmongorestore\fR
-is a tool to use the output from mongodump to restore a database.
-.SH "OPTIONS"
+.TH "MONGORESTORE" "1" "March 14, 2013" "2.2.3" "mongodb-manual"
+.SH NAME
+mongorestore \- MongoDB
+.
+.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
+..
+.\" Man page generated from reStructuredText.
+.
+.SH SYNOPSIS
+.sp
+The \fI\%mongorestore\fP tool imports content from binary database
+dump, created by \fBmongodump\fP into a specific
+database. \fI\%mongorestore\fP can import content to an existing
+database or create a new one.
+.sp
+\fI\%mongorestore\fP only performs inserts into the existing
+database, and does not perform updates or \fIupserts\fP. If
+existing data with the same \fB_id\fP already exists on the target
+database, \fI\%mongorestore\fP will \fInot\fP replace it.
+.sp
+\fI\%mongorestore\fP will recreate indexes from the dump
+.sp
+The behavior of \fI\%mongorestore\fP has the following properties:
+.INDENT 0.0
+.IP \(bu 2
+all operations are inserts, not updates.
+.IP \(bu 2
+all inserts are "fire and forget," \fI\%mongorestore\fP does not
+wait for a response from a \fBmongod\fP to ensure that the
+MongoDB process has received or recorded the operation.
+.sp
+The \fBmongod\fP will record any errors to its log that occur
+during a restore operation but \fI\%mongorestore\fP will not
+receive errors.
+.UNINDENT
+.IP Note
+The format of data created by \fBmongodump\fP tool from the
+2.2 distribution or later is different and incompatible with
+earlier versions of \fBmongod\fP.
+.RE
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B mongorestore
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-help
-show usage information
+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
+the option multiple times, (e.g. \fB\-vvvvv\fP.)
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-version
-show version information
+Returns the version of the \fI\%mongorestore\fP tool.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-h, \-\-host HOST
-server to connect to (default HOST=localhost)
+.B \-\-host <hostname><:port>
+Specifies a resolvable hostname for the \fBmongod\fP to which
+you want to restore the database. By default
+\fI\%mongorestore\fP will attempt to connect to a MongoDB
+process running on the localhost port number \fB27017\fP.
+.sp
+Optionally, specify a port number to connect a MongoDB instance
+running on a port other than \fB27017\fP.
+.sp
+To connect to a replica set, you can specify the replica set seed
+name, and a seed list of set members, in the following format:
+.sp
+.nf
+.ft C
+<replica_set_name>/<hostname1><:port>,<hostname2:<port>,...
+.ft P
+.fi
+.UNINDENT
+.INDENT 0.0
.TP
-.B\-\-port arg
-server port. Can also use \-\-host hostname:port
+.B \-\-port <port>
+Specifies the port number, if the MongoDB instance is not running
+on the standard port. (i.e. \fB27017\fP) You may also specify a port
+number using the \fI\%--host\fP command.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-ipv6
-enable IPv6 support (disabled by default)
+Enables IPv6 support that allows \fI\%mongorestore\fP to connect
+to the MongoDB instance using an IPv6 network. All MongoDB programs
+and processes, including \fI\%mongorestore\fP, disable IPv6
+support by default.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-u|\-\-username USERNAME
-specify user to log in as
+.B \-\-ssl
+New in version 2.4: MongoDB added support for SSL connections to \fBmongod\fP
+instances in mongorestore.
+.IP Note
+SSL support in mongorestore is not compiled into the default
+distribution of MongoDB. See \fB/administration/ssl\fP for more
+information on SSL and MongoDB.
+.sp
+Additionally, mongorestore does not support connections to
+\fBmongod\fP instances that require client certificate
+validation.
+.RE
+.sp
+Allows \fI\%mongorestore\fP to connect to \fBmongod\fP
+instance over an SSL connection.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-p|\-\-password PASSWORD
-specify password of user (notice there is no space)
+.B \-\-username <username>, \-u <username>
+Specifies a username to authenticate to the MongoDB instance, if
+your database requires authentication. Use in conjunction with the
+\fI\%--password\fP option to supply a
+password.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-d, \-\-db DATABASE
-database to use
+.B \-\-password <password>, \-p <password>
+Specifies a password to authenticate to the MongoDB instance. Use
+in conjunction with the \fI\%mongorestore --username\fP option to
+supply a username.
+.sp
+If you specify a \fI\%--username\fP
+without the \fI\%--password\fP option, \fI\%mongorestore\fP
+will prompt for a password interactively.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-c, \-\-c COLLECTION
-collection to use
+.B \-\-authenticationDatabase <dbname>
+New in version 2.4.
+.sp
+Specifies the database that holds the user\(aqs (e.g
+\fI\%--username\fP) credentials.
+.sp
+By default, \fI\%mongorestore\fP assumes that the database specified to the
+\fI\%--db\fP argument holds the user\(aqs credentials, unless you
+specify \fI\%--authenticationDatabase\fP.
+.sp
+See \fBuserSource\fP,
+\fB/reference/privilege\-documents\fP and
+\fB/reference/user\-privileges\fP for more information about
+delegated authentication in MongoDB.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-dbpath PATH
-directly access mongod data files in this path, instead of connecting to a mongod instance
+.B \-\-authenticationMechanism <name>
+New in version 2.4.
+.sp
+Specifies the authentication mechanism. By default, the
+authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB
+challenge/response authentication mechanism. In the MongoDB Subscriber Edition,
+\fI\%mongorestore\fP also includes support for \fBGSSAPI\fP to handle
+Kerberos authentication.
+.sp
+See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP
+for more information about Kerberos authentication.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-dbpath <path>
+Specifies the directory of the MongoDB data files. If used, the
+\fI\%--dbpath\fP option enables \fI\%mongorestore\fP to attach
+directly to local data files and insert the data without the
+\fBmongod\fP. To run with \fI\%--dbpath\fP,
+\fI\%mongorestore\fP needs to lock access to the data directory:
+as a result, no \fBmongod\fP can access the same path while the
+process runs.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-directoryperdb
-if dbpath specified, each db is in a separate directory
+Use the \fI\%--directoryperdb\fP in conjunction with the
+corresponding option to \fBmongod\fP, which allows
+\fI\%mongorestore\fP to import data into MongoDB instances that
+have every database\(aqs files saved in discrete directories on the
+disk. This option is only relevant when specifying the
+\fI\%--dbpath\fP option.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-journal
+Allows \fI\%mongorestore\fP write to the durability
+\fIjournal\fP to ensure that the data files will remain in a
+consistent state during the write process. This option is only
+relevant when specifying the \fI\%--dbpath\fP option.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-db <db>, \-d <db>
+Use the \fI\%--db\fP option to specify a database for
+\fI\%mongorestore\fP to restore data \fIinto\fP. If the database
+doesn\(aqt exist, \fI\%mongorestore\fP will create the specified
+database. If you do not specify a \fB<db>\fP,
+\fI\%mongorestore\fP creates new databases that correspond to
+the databases where data originated and data may be
+overwritten. Use this option to restore data into a MongoDB
+instance that already has data.
+.sp
+\fI\%--db\fP does \fInot\fP control which \fIBSON\fP files
+\fI\%mongorestore\fP restores. You must use the
+\fI\%mongorestore\fP \fI\%path option\fP to limit that restored data.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-collection <collection>, \-c <collection>
+Use the \fI\%--collection\fP option to specify a collection for
+\fI\%mongorestore\fP to restore. If you do not specify a
+\fB<collection>\fP, \fI\%mongorestore\fP imports all collections
+created. Existing data may be overwritten. Use this option to
+restore data into a MongoDB instance that already has data, or to
+restore only some data in the specified imported data set.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-objcheck
-validate object before inserting
+Forces the \fI\%mongorestore\fP to validate all requests from
+clients upon receipt to ensure that clients never insert invalid
+documents into the database. 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
+object checking at run\-time.
+.sp
+Changed in version 2.4: MongoDB enables \fI\%--objcheck\fP by default, to prevent any
+client from inserting malformed or invalid BSON into a MongoDB
+database.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-noobjcheck
+New in version 2.4.
+.sp
+Disables the default document validation that MongoDB performs on all
+incoming BSON documents.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-filter arg
-filter to apply before inserting
+.B \-\-filter \(aq<JSON>\(aq
+Limits the documents that \fI\%mongorestore\fP imports to only
+those documents that match the JSON document specified as
+\fB\(aq<JSON>\(aq\fP. Be sure to include the document in single quotes to
+avoid interaction with your system\(aqs shell environment.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-drop
-drop each collection before import
+Modifies the restoration procedure to drop every collection from
+the target database before restoring the collection from the dumped
+backup.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-oplogReplay
-replay oplog for point-in-time restore
-.SH "COPYRIGHT"
-.PP
-Copyright 2007\-2011 10gen
-.SH "SEE ALSO"
-For more information, please refer to the mongorestore page in the MongoDB manual, available at http://dochub.mongodb.org/core/mongorestoremanpage
-.SH "AUTHOR"
-Kristina Chodorow
+Replays the \fIoplog\fP after restoring the dump to ensure that the current
+state of the database reflects the point\-in\-time backup captured with
+the "\fImongodump \-\-oplog\fP" command.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-keepIndexVersion
+Prevents \fI\%mongorestore\fP from upgrading the index to the latest
+version during the restoration process.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-w <number of replicas per write>
+New in version 2.2.
+.sp
+Specifies the \fIwrite concern\fP for each write operation that
+\fI\%mongorestore\fP writes to the target database. By default,
+\fI\%mongorestore\fP does not wait for a response for
+\fIwrite acknowledgment\fP.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-noOptionsRestore
+New in version 2.2.
+.sp
+Prevents \fI\%mongorestore\fP from setting the collection
+options, such as those specified by the \fBcollMod\fP
+\fIdatabase command\fP, on restored collections.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-noIndexRestore
+New in version 2.2.
+.sp
+Prevents \fI\%mongorestore\fP from restoring and building
+indexes as specified in the corresponding \fBmongodump\fP
+output.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-oplogLimit <timestamp>
+New in version 2.2.
+.sp
+Prevents \fI\%mongorestore\fP from applying \fIoplog\fP entries newer
+than the \fB<timestamp>\fP. Specify \fB<timestamp>\fP values in the
+form of \fB<time_t>:<ordinal>\fP, where \fB<time_t>\fP is the seconds
+since the UNIX epoch, and \fB<ordinal>\fP represents a counter of
+operations in the oplog that occurred in the specified second.
+.sp
+You must use \fI\%--oplogLimit\fP in conjunction with the
+\fI\%--oplogReplay\fP option.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B <path>
+The final argument of the \fI\%mongorestore\fP command is a
+directory path. This argument specifies the location of the
+database dump from which to restore.
+.UNINDENT
+.SH USAGE
+.sp
+See \fB/tutorial/backup\-databases\-with\-binary\-database\-dumps\fP
+for a larger overview of \fI\%mongorestore\fP
+usage. Also see the "\fBmongodump\fP" document for an overview of the
+\fBmongodump\fP, which provides the related inverse
+functionality.
+.sp
+Consider the following example:
+.sp
+.nf
+.ft C
+mongorestore \-\-collection people \-\-db accounts dump/accounts/
+.ft P
+.fi
+.sp
+Here, \fI\%mongorestore\fP reads the database dump in the \fBdump/\fP
+sub\-directory of the current directory, and restores \fIonly\fP the
+documents in the collection named \fBpeople\fP from the database named
+\fBaccounts\fP. \fI\%mongorestore\fP restores data to the instance
+running on the localhost interface on port \fB27017\fP.
+.sp
+In the next example, \fI\%mongorestore\fP restores a backup of the
+database instance located in \fBdump\fP to a database instance stored
+in the \fB/srv/mongodb\fP on the local machine. This requires that there
+are no active \fBmongod\fP instances attached to \fB/srv/mongodb\fP
+data directory.
+.sp
+.nf
+.ft C
+mongorestore \-\-dbpath /srv/mongodb
+.ft P
+.fi
+.sp
+In the final example, \fI\%mongorestore\fP restores a database
+dump located at \fB/opt/backup/mongodump\-2011\-10\-24\fP, from a database
+running on port \fB37017\fP on the host
+\fBmongodb1.example.net\fP. \fI\%mongorestore\fP authenticates to
+the this MongoDB instance using the username \fBuser\fP and the
+password \fBpass\fP, as follows:
+.sp
+.nf
+.ft C
+mongorestore \-\-host mongodb1.example.net \-\-port 37017 \-\-username user \-\-password pass /opt/backup/mongodump\-2011\-10\-24
+.ft P
+.fi
+.SH AUTHOR
+MongoDB Documentation Project
+.SH COPYRIGHT
+2011-2013, 10gen, Inc.
+.\" Generated by docutils manpage writer.
+.
diff --git a/debian/mongos.1 b/debian/mongos.1
index 6fdca07463b..27c0bd768e8 100644
--- a/debian/mongos.1
+++ b/debian/mongos.1
@@ -1,89 +1,400 @@
-.TH MONGOS "1" "June 2009" "10gen" "Mongo Database"
-.SH "NAME"
-mongos \- the Mongo sharding server
-.SH "SYNOPSIS"
-\fBmongos [\fIOPTIONS\fR]\fR
-.SH "DESCRIPTION"
-.PP
-\fBmongos\fR
-is used to setup, configure, and get information about sharded databases.
-.SH "EXAMPLES"
-.PP
-.B ./mongod --port 9999 --dbpath /data/db/a # first server
-.PP
-.B ./mongod --port 9998 --dbpath /data/db/b # second server
-.PP
-.B ./mongos --configdb localhost:9999 # mongos
-.PP
-starts three servers to set up sharding
-.SH "OPTIONS"
-.TP
-.B \-\-help
-show usage information
-.TP
-.B \-h, \-\-help
-show this usage information
+.TH "MONGOS" "1" "March 14, 2013" "2.2.3" "mongodb-manual"
+.SH NAME
+mongos \- MongoDB Shard 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
+..
+.\" Man page generated from reStructuredText.
+.
+.SH SYNOPSIS
+.sp
+\fI\%mongos\fP for "MongoDB Shard," is a routing service for
+MongoDB shard configurations that processes queries from the
+application layer, and determines the location of this data in the
+\fIsharded cluster\fP, in order to complete these operations.
+From the perspective of the application, a
+\fI\%mongos\fP instance behaves identically to any other MongoDB
+instance.
+.IP Note
+Changed in version 2.1.
+.sp
+Some aggregation operations using the \fBaggregate\fP will
+cause \fI\%mongos\fP instances to require more CPU resources
+than in previous versions. This modified performance profile may
+dictate alternate architecture decisions if you use the
+\fIaggregation framework\fP extensively in a sharded environment.
+.RE
+.IP "See also"
+.sp
+\fB/sharding\fP and \fB/core/sharded\-clusters\fP.
+.RE
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B mongos
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-help, \-h
+Returns a basic help and usage text.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-version
-show version information
+Returns the version of the \fBmongod\fP daemon.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-config <filename>, \-f <filename>
+Specifies a configuration file, that you can use to specify
+runtime\-configurations. While the options are equivalent and
+accessible via the other command line arguments, the configuration
+file is the preferred method for runtime configuration of
+mongod. See the "\fB/reference/configuration\-options\fP" document
+for more information about these options.
+.sp
+Not all configuration options for \fBmongod\fP make sense in
+the context of \fI\%mongos\fP.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-f, \-\-config arg
-configuration file specifying additional options
+.B \-\-verbose, \-v
+Increases the amount of internal reporting returned on standard
+output or in the log file specified by \fI\%--logpath\fP. Use the
+\fB\-v\fP form to control the level of verbosity by including the
+option multiple times, (e.g. \fB\-vvvvv\fP.)
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-v, \-\-verbose
-be more verbose (include multiple times for more verbosity
-e.g. -vvvvv)
+.B \-\-quiet
+Runs the \fI\%mongos\fP instance in a quiet mode that attempts to limit
+the amount of output.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-quiet quieter output
+.B \-\-port <port>
+Specifies a TCP port for the \fI\%mongos\fP to listen for client
+connections. By default \fI\%mongos\fP listens for connections on
+port 27017.
+.sp
+UNIX\-like systems require root access to access ports with numbers
+lower than 1024.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-port arg specify port number
+.B \-\-bind_ip <ip address>
+The IP address that the \fI\%mongos\fP process will bind to and
+listen for connections. By default \fI\%mongos\fP listens for
+connections on the localhost (i.e. \fB127.0.0.1\fP address.) You may
+attach \fI\%mongos\fP to any interface; however, if you attach
+\fI\%mongos\fP to a publicly accessible interface you must
+implement proper authentication or firewall restrictions to protect
+the integrity of your database.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-bind_ip arg
-comma separated list of ip addresses to listen on - all local ips by
-default
+.B \-\-maxConns <number>
+Specifies the maximum number of simultaneous connections that
+\fI\%mongos\fP will accept. This setting will have no effect if
+the value of this setting is higher than your operating system\(aqs
+configured maximum connection tracking threshold.
+.sp
+This is particularly useful for \fI\%mongos\fP if you have a
+client that creates a number of collections but allows them to
+timeout rather than close the collections. When you set
+\fBmaxConns\fP, ensure the value is slightly higher than the
+size of the connection pool or the total number of connections to
+prevent erroneous connection spikes from propagating to the members
+of a \fIshard\fP cluster.
+.IP Note
+You cannot set \fBmaxConns\fP to a value higher
+than \fI20000\fP.
+.RE
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-logpath arg
-log file to send write to instead of stdout - has to be a file, not
-directory
+.B \-\-objcheck
+Forces the \fI\%mongos\fP to validate all requests from clients
+upon receipt to ensure that invalid objects are never inserted into
+the database. This option has a performance impact, and is not
+enabled by default.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-logpath <path>
+Specify a path for the log file that will hold all diagnostic
+logging information.
+.sp
+Unless specified, \fI\%mongos\fP will output all log information
+to the standard output. Additionally, unless you also specify
+\fI\%--logappend\fP, the logfile will be overwritten when the
+process restarts.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-logappend
-append to logpath instead of over-writing
+Specify to ensure that \fI\%mongos\fP appends additional logging
+data to the end of the logfile rather than overwriting the content
+of the log when the process restarts.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-syslog
+New in version 2.1.0.
+.sp
+Sends all logging output to the host\(aqs \fIsyslog\fP system rather
+than to standard output or a log file as with \fI\%--logpath\fP.
+.IP Warning
+You cannot use \fI\%--syslog\fP with \fI\%--logpath\fP.
+.RE
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-pidfilepath <path>
+Specify a file location to hold the "\fIPID\fP" or process ID of the
+\fI\%mongos\fP process. Useful for tracking the \fI\%mongos\fP process in
+combination with the \fI\%mongos --fork\fP option.
+.sp
+Without a specified \fI\%--pidfilepath\fP option,
+\fI\%mongos\fP creates no PID file.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-pidfilepath arg
-full path to pidfile (if not set, no pidfile is created)
+.B \-\-keyFile <file>
+Specify the path to a key file to store authentication
+information. This option is only useful for the connection between
+\fI\%mongos\fP instances and components of the \fIsharded cluster\fP.
+.IP "See also"
+.sp
+\fIsharding\-security\fP
+.RE
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-keyFile arg
-private key for cluster authentication (only for replica sets)
+.B \-\-nounixsocket
+Disables listening on the UNIX socket. Without this option
+\fI\%mongos\fP creates a UNIX socket.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-unixSocketPrefix arg
-alternative directory for UNIX domain sockets (defaults to /tmp)
+.B \-\-unixSocketPrefix <path>
+Specifies a path for the UNIX socket. Unless specified,
+\fI\%mongos\fP creates a socket in the \fB/tmp\fP path.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-fork
-fork server process
-
-.SH "SHARDING OPTIONS"
+Enables a \fIdaemon\fP mode for \fBmongod\fP which forces the
+process to the background. This is the normal mode of operation, in
+production and production\-like environments, but may \fInot\fP be
+desirable for testing.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-configdb arg
-1 or 3 comma separated config servers
+.B \-\-configdb <config1>,<config2><:port>,<config3>
+Set this option to specify a configuration database
+(i.e. \fIconfig database\fP) for the \fIsharded cluster\fP. You must
+specify either 1 configuration server or 3 configuration servers,
+in a comma separated list.
+.IP Note
+\fI\%mongos\fP instances read from the first \fIconfig
+server\fP in the list provided. All
+\fI\%mongos\fP instances \fBmust\fP specify the hosts to the
+\fI\%--configdb\fP setting in the same order.
+.sp
+If your configuration databases reside in more that one data
+center, order the hosts in the \fI\%--configdb\fP argument so
+that the config database that is closest to the majority of your
+\fI\%mongos\fP instances is first servers in the list.
+.RE
+.IP Warning
+Never remove a config server from the \fI\%--configdb\fP parameter, even if
+the config server or servers are not available, or offline.
+.RE
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-test
-just run unit tests
+This option is for internal testing use only, and runs unit tests
+without starting a \fI\%mongos\fP instance.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-upgrade
-upgrade meta data version
+This option updates the meta data format used by the
+\fIconfig database\fP.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-chunkSize arg
-maximum amount of data per chunk
+.B \-\-chunkSize <value>
+The value of the \fI\%--chunkSize\fP determines the size of each
+\fIchunk\fP, \fIin megabytes\fP, of data distributed around the
+\fIsharded cluster\fP. The default value is 64 megabytes, which
+is the ideal size for chunks in most deployments: larger chunk size
+can lead to uneven data distribution, smaller chunk size often
+leads to inefficient movement of chunks between nodes. However, in
+some circumstances it may be necessary to set a different chunk
+size.
+.sp
+This option \fIonly\fP sets the chunk size when initializing the
+cluster for the first time. If you modify the run\-time option
+later, the new value will have no effect. See the
+"\fIsharding\-balancing\-modify\-chunk\-size\fP" procedure if you
+need to change the chunk size on an existing sharded cluster.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-ipv6
-enable IPv6 support (disabled by default)
+Enables IPv6 support to allow clients to connect to \fI\%mongos\fP
+using IPv6 networks. MongoDB disables IPv6 support by default in
+\fBmongod\fP and all utilities.
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-jsonp
-allow JSONP access via http (has security implications)
-.SH "COPYRIGHT"
-.PP
-Copyright 2007\-2011 10gen
-.SH "SEE ALSO"
-For more information, please refer to the mongos page in the MongoDB manual, available at http://dochub.mongodb.org/core/mongosmanpage
-.SH "AUTHOR"
-Kristina Chodorow
+Permits \fIJSONP\fP access via an HTTP interface. Consider the
+security implications of allowing this activity before enabling
+this option.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-noscripting
+Disables the scripting engine.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-nohttpinterface
+New in version 2.1.2.
+.sp
+Disables the HTTP interface.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-localThreshold
+New in version 2.2.
+.sp
+\fI\%--localThreshold\fP affects the logic that \fI\%mongos\fP
+uses when selecting \fIreplica set\fP members to pass read
+operations to from clients. Specify a value to
+\fI\%--localThreshold\fP in milliseconds. The default value is
+\fB15\fP, which corresponds to the default value in all of the client
+\fBdrivers\fP.
+.sp
+When \fI\%mongos\fP receives a request that permits reads to
+\fIsecondary\fP members, the \fI\%mongos\fP will:
+.INDENT 7.0
+.INDENT 3.5
+.INDENT 0.0
+.IP \(bu 2
+find the member of the set with the lowest ping time.
+.IP \(bu 2
+construct a list of replica set members that is within a ping
+time of 15 milliseconds of the nearest suitable member of the
+set.
+.sp
+If you specify a value for \fI\%--localThreshold\fP,
+\fI\%mongos\fP will construct the list of replica members
+that are within the latency allowed by this value.
+.IP \(bu 2
+The \fI\%mongos\fP will select a member to read from at
+random from this list.
+.UNINDENT
+.UNINDENT
+.UNINDENT
+.sp
+The ping time used for a set member compared by the
+\fI\%--localThreshold\fP setting is a moving average of recent
+ping times, calculated, at most, every 10 seconds. As a result, some queries
+may reach members above the threshold until the \fI\%mongos\fP
+recalculates the average.
+.sp
+See the \fIreplica\-set\-read\-preference\-behavior\-member\-selection\fP
+section of the \fIread preference\fP
+documentation for more information.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-noAutoSplit
+New in version 2.0.7.
+.sp
+\fI\%--noAutoSplit\fP prevents \fI\%mongos\fP from
+automatically inserting metadata splits in a \fIsharded
+collection\fP. If set on all \fI\%mongos\fP, this will prevent
+MongoDB from creating new chunks as the data in a collection
+grows.
+.sp
+Because any \fI\%mongos\fP in a cluster can create a split,
+to totally disable splitting in a cluster you must
+set \fI\%--noAutoSplit\fP on all \fI\%mongos\fP.
+.IP Warning
+With \fI\%--noAutoSplit\fP enabled, the data in your sharded
+cluster may become imbalanced over time. Enable with caution.
+.RE
+.UNINDENT
+.SS SSL Options
+.IP "See"
+.sp
+\fB/administration/ssl\fP for full documentation of
+MongoDB\(aqs support.
+.RE
+.INDENT 0.0
+.TP
+.B \-\-authenticationDatabase <dbname>
+New in version 2.4.
+.sp
+Specifies the database that holds the user\(aqs (e.g
+\fI\-\-username\fP) credentials.
+.sp
+By default, \fI\%mongos\fP assumes that the database specified to the
+\fI\-\-db\fP argument holds the user\(aqs credentials, unless you
+specify \fI\%--authenticationDatabase\fP.
+.sp
+See \fBuserSource\fP,
+\fB/reference/privilege\-documents\fP and
+\fB/reference/user\-privileges\fP for more information about
+delegated authentication in MongoDB.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-authenticationMechanism <name>
+New in version 2.4.
+.sp
+Specifies the authentication mechanism. By default, the
+authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB
+challenge/response authentication mechanism. In the MongoDB Subscriber Edition,
+\fI\%mongos\fP also includes support for \fBGSSAPI\fP to handle
+Kerberos authentication.
+.sp
+See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP
+for more information about Kerberos authentication.
+.UNINDENT
+.SH AUTHOR
+MongoDB Documentation Project
+.SH COPYRIGHT
+2011-2013, 10gen, Inc.
+.\" Generated by docutils manpage writer.
+.
diff --git a/debian/mongosniff.1 b/debian/mongosniff.1
index e1b9a1faddf..8b4ffd41d2a 100644
--- a/debian/mongosniff.1
+++ b/debian/mongosniff.1
@@ -1,33 +1,183 @@
-.TH MONGOSNIFF "1" "Jan 2010" "10gen" "Mongo Database"
-.SH "NAME"
-mongosniff \- the Mongo packet analyzer
-.SH "SYNOPSIS"
-\fBmongosniff [\fIOPTIONS\fR] [\fI<port0> <port1> ...\fR]
-.SH "DESCRIPTION"
-.PP
-\fBmongosniff\fR
-is a analyzer tool for analyzing packets coming to your database.
-.PP
-.SH "OPTIONS"
+.TH "MONGOSNIFF" "1" "March 14, 2013" "2.2.3" "mongodb-manual"
+.SH NAME
+mongosniff \- MongoDB
+.
+.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
+..
+.\" Man page generated from reStructuredText.
+.
+.SH SYNOPSIS
+.sp
+\fI\%mongosniff\fP provides a low\-level operation tracing/sniffing view
+into database activity in real time. Think of \fI\%mongosniff\fP as a
+MongoDB\-specific analogue of \fBtcpdump\fP for TCP/IP network
+traffic. Typically, \fI\%mongosniff\fP is most frequently used in driver
+development.
+.IP Note
+\fI\%mongosniff\fP requires \fBlibpcap\fP and is only available for
+Unix\-like systems. Furthermore, the version distributed with the
+MongoDB binaries is dynamically linked against aversion 0.9 of
+\fBlibpcap\fP. If your system has a different version of \fBlibpcap\fP, you
+will need to compile \fI\%mongosniff\fP yourself or create a
+symbolic link pointing to \fBlibpcap.so.0.9\fP to your local version
+of \fBlibpcap\fP. Use an operation that resembles the following:
+.sp
+.nf
+.ft C
+ln \-s /usr/lib/libpcap.so.1.1.1 /usr/lib/libpcap.so.0.9
+.ft P
+.fi
+.sp
+Change the path\(aqs and name of the shared library as needed.
+.RE
+.sp
+As an alternative to \fI\%mongosniff\fP, Wireshark, a popular
+network sniffing tool is capable of inspecting and parsing the MongoDB
+wire protocol.
+.SH OPTIONS
+.INDENT 0.0
.TP
-.B \-\-forward
-Forward all parsed request messages to mongod instance at specified host:port
-.TP
-.B \-\-source
-Source of traffic to sniff, either a network interface or a file containing previously captured packets, in pcap format. If no source is specified, mongosniff will attempt to sniff from one of the machine's network interfaces.
+.B mongosniff
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-help
-print a short help message.
+Returns a basic help and usage text.
+.UNINDENT
+.INDENT 0.0
.TP
-.B <port0>
-These parameters are used to filter sniffing. By default, only port 27017 is sniffed.
+.B \-\-forward <host><:port>
+Declares a host to forward all parsed requests that the
+\fI\%mongosniff\fP intercepts to another \fBmongod\fP
+instance and issue those operations on that database instance.
+.sp
+Specify the target host name and port in the \fB<host><:port>\fP
+format.
+.sp
+To connect to a replica set, you can specify the replica set seed
+name, and a seed list of set members, in the following format:
+.sp
+.nf
+.ft C
+<replica_set_name>/<hostname1><:port>,<hostname2:<port>,...
+.ft P
+.fi
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-help
-show usage information
-.SH "COPYRIGHT"
-.PP
-Copyright 2007\-2011 10gen
-.SH "SEE ALSO"
-For more information, please refer to the mongosniff page in the MongoDB manual, available at http://dochub.mongodb.org/core/mongosniffmanpage
-.SH "AUTHOR"
-Antonin Kral
+.B \-\-source <NET [interface]>, <FILE [filename]>, <DIAGLOG [filename]>
+Specifies source material to inspect. Use \fB\-\-source NET
+[interface]\fP to inspect traffic from a network interface
+(e.g. \fBeth0\fP or \fBlo\fP.) Use \fB\-\-source FILE [filename]\fP to
+read captured packets in \fIpcap\fP format.
+.sp
+You may use the \fB\-\-source DIAGLOG [filename]\fP option to read
+the output files produced by the \fI\-\-diaglog\fP
+option.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-objcheck
+Modifies the behavior to \fIonly\fP display invalid BSON objects and
+nothing else. Use this option for troubleshooting driver
+development. This option has some performance impact on the
+performance of \fI\%mongosniff\fP.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B <port>
+Specifies alternate ports to sniff for traffic. By default,
+\fI\%mongosniff\fP watches for MongoDB traffic on port 27017. Append
+multiple port numbers to the end of \fI\%mongosniff\fP to monitor
+traffic on multiple ports.
+.UNINDENT
+.SH USAGE
+.sp
+Use the following command to connect to a \fBmongod\fP or
+\fBmongos\fP running on port 27017 \fIand\fP 27018 on the localhost
+interface:
+.sp
+.nf
+.ft C
+mongosniff \-\-source NET lo 27017 27018
+.ft P
+.fi
+.sp
+Use the following command to only log invalid \fIBSON\fP objects for
+the \fBmongod\fP or \fBmongos\fP running on the localhost
+interface and port 27018, for driver development and troubleshooting:
+.sp
+.nf
+.ft C
+mongosniff \-\-objcheck \-\-source NET lo 27018
+.ft P
+.fi
+.SH BUILD MONGOSNIFF
+.sp
+To build \fBmongosniff\fP yourself, Linux users can use the following
+procedure:
+.INDENT 0.0
+.IP 1. 3
+Obtain prerequisites using your operating
+systems package management software. Dependencies include:
+.INDENT 3.0
+.IP \(bu 2
+\fBlibpcap\fP \- to capture network packets.
+.IP \(bu 2
+\fBgit\fP \- to download the MongoDB source code.
+.IP \(bu 2
+\fBscons\fP and a C++ compiler \- to build \fI\%mongosniff\fP.
+.UNINDENT
+.IP 2. 3
+Download a copy of the MongoDB source code using \fBgit\fP:
+.sp
+.nf
+.ft C
+git clone git://github.com/mongodb/mongo.git
+.ft P
+.fi
+.IP 3. 3
+Issue the following sequence of commands to change to the
+\fBmongo/\fP directory and build \fI\%mongosniff\fP:
+.sp
+.nf
+.ft C
+cd mongo
+scons mongosniff
+.ft P
+.fi
+.UNINDENT
+.IP Note
+If you run \fBscons mongosniff\fP before installing \fBlibpcap\fP you
+must run \fBscons clean\fP before you can build \fI\%mongosniff\fP.
+.RE
+.SH AUTHOR
+MongoDB Documentation Project
+.SH COPYRIGHT
+2011-2013, 10gen, Inc.
+.\" Generated by docutils manpage writer.
+.
diff --git a/debian/mongostat.1 b/debian/mongostat.1
index 06e43338a6c..61d99a23ce5 100644
--- a/debian/mongostat.1
+++ b/debian/mongostat.1
@@ -1,113 +1,501 @@
-.TH MONGOSTAT "1" "March 2010" "10gen" "Mongo Database"
-.SH "NAME"
-mongostat \- view statistics on a running mongod instance
-.SH "SYNOPSIS"
-\fBmongostat [\fIOPTIONS\fR] [\fISLEEP TIME\fR]
-.SH "DESCRIPTION"
-.PP
-\fBmongostat\fR
-prints statistics on a running mongod instance. [\fISLEEP TIME\fR] is
-time to wait (in seconds) between calls to servers
-.SH "OPTIONS"
-.TP
-.B \-\-help
-produce help message
+.TH "MONGOSTAT" "1" "March 14, 2013" "2.2.3" "mongodb-manual"
+.SH NAME
+mongostat \- MongoDB
+.
+.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
+..
+.\" Man page generated from reStructuredText.
+.
+.SH SYNOPSIS
+.sp
+The \fI\%mongostat\fP utility provides a quick overview of the
+status of a currently running \fBmongod\fP
+or \fBmongos\fP
+instance. \fI\%mongostat\fP is functionally similar to the
+UNIX/Linux file system utility \fBvmstat\fP, but provides data regarding
+\fBmongod\fP and \fBmongos\fP instances.
+.IP "See also"
+.sp
+For more information about monitoring MongoDB, see
+\fB/administration/monitoring\fP.
+.sp
+For more background on various other MongoDB status outputs see:
+.INDENT 0.0
+.IP \(bu 2
+\fB/reference/server\-status\fP
+.IP \(bu 2
+\fB/reference/replica\-status\fP
+.IP \(bu 2
+\fB/reference/database\-statistics\fP
+.IP \(bu 2
+\fB/reference/collection\-statistics\fP
+.UNINDENT
+.sp
+For an additional utility that provides MongoDB metrics see
+"\fBmongotop\fP."
+.RE
+.sp
+\fI\%mongostat\fP connects to the \fBmongod\fP instance running
+on the local host interface on TCP port \fB27017\fP; however,
+\fI\%mongostat\fP can connect to any accessible remote \fBmongod\fP
+instance.
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B mongostat
+.UNINDENT
+.INDENT 0.0
+.TP
+.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
+the option multiple times, (e.g. \fB\-vvvvv\fP.)
+.UNINDENT
+.INDENT 0.0
.TP
.B \-\-version
-show version information
+Returns the version of the \fI\%mongostat\fP utility.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-host <hostname><:port>
+Specifies a resolvable hostname for the \fBmongod\fP from which you
+want to export data. By default \fI\%mongostat\fP attempts to connect
+to a MongoDB instance running on the localhost port number \fB27017\fP.
+.sp
+Optionally, specify a port number to connect a MongoDB instance
+running on a port other than \fB27017\fP.
+.sp
+To connect to a replica set, you can specify the replica set seed
+name, and a seed list of set members, in the following format:
+.sp
+.nf
+.ft C
+<replica_set_name>/<hostname1><:port>,<hostname2:<port>,...
+.ft P
+.fi
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-port <port>
+Specifies the port number, if the MongoDB instance is not running on
+the standard port. (i.e. \fB27017\fP) You may also specify a port
+number using the \fI\%mongostat --host\fP command.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-ipv6
+Enables IPv6 support that allows \fI\%mongostat\fP to connect
+to the MongoDB instance using an IPv6 network. All MongoDB programs
+and processes, including \fI\%mongostat\fP, disable IPv6
+support by default.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-v, \-\-verbose
-be more verbose (include multiple times for more verbosity
-e.g. \-vvvvv)
+.B \-\-ssl
+New in version 2.4: MongoDB added support for SSL connections to \fBmongod\fP
+instances in mongostat.
+.IP Note
+SSL support in mongostat is not compiled into the default
+distribution of MongoDB. See \fB/administration/ssl\fP for more
+information on SSL and MongoDB.
+.sp
+Additionally, mongostat does not support connections to
+\fBmongod\fP instances that require client certificate
+validation.
+.RE
+.sp
+Allows \fI\%mongostat\fP to connect to \fBmongod\fP
+instance over an SSL connection.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-h, \-\-host arg
-mongo host to connect to ( <set name>/s1,s2 for sets)
+.B \-\-username <username>, \-u <username>
+Specifies a username to authenticate to the MongoDB instance, if your
+database requires authentication. Use in conjunction with the
+\fI\%mongostat --password\fP option to supply a password.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-port arg
-server port. Can also use \-\-host hostname:port
+.B \-\-password <password>, \-p <password>
+Specifies a password to authenticate to the MongoDB instance. Use
+in conjunction with the \fI\%mongostat --username\fP option to
+supply a username.
+.sp
+If you specify a \fI\%--username\fP
+without the \fI\%--password\fP option, \fI\%mongostat\fP will
+prompt for a password interactively.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-ipv6
-enable IPv6 support (disabled by default)
+.B \-\-authenticationDatabase <dbname>
+New in version 2.4.
+.sp
+Specifies the database that holds the user\(aqs (e.g
+\fI\%--username\fP) credentials.
+.sp
+By default, \fI\%mongostat\fP assumes that the database specified to the
+\fI\-\-db\fP argument holds the user\(aqs credentials, unless you
+specify \fI\%--authenticationDatabase\fP.
+.sp
+See \fBuserSource\fP,
+\fB/reference/privilege\-documents\fP and
+\fB/reference/user\-privileges\fP for more information about
+delegated authentication in MongoDB.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-u, \-\-username arg
-username
+.B \-\-authenticationMechanism <name>
+New in version 2.4.
+.sp
+Specifies the authentication mechanism. By default, the
+authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB
+challenge/response authentication mechanism. In the MongoDB Subscriber Edition,
+\fI\%mongostat\fP also includes support for \fBGSSAPI\fP to handle
+Kerberos authentication.
+.sp
+See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP
+for more information about Kerberos authentication.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-p, \-\-password arg
-password
+.B \-\-noheaders
+Disables the output of column or field names.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-noheaders
-don't output column names
+.B \-\-rowcount <number>, \-n <number>
+Controls the number of rows to output. Use in conjunction with
+the \fBsleeptime\fP argument to control the duration of a
+\fI\%mongostat\fP operation.
+.sp
+Unless \fI\%--rowcount\fP is specified, \fI\%mongostat\fP
+will return an infinite number
+of rows (e.g. value of \fB0\fP.)
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-n, \-\-rowcount arg
-number of stats lines to print (0 for indefinite)
+.B \-\-http
+Configures \fI\%mongostat\fP to collect data using the HTTP interface
+rather than a raw database connection.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-http
-use http instead of raw db connection
+.B \-\-discover
+With this option \fI\%mongostat\fP discovers and reports on
+statistics from all members of a \fIreplica set\fP or
+\fIsharded cluster\fP. When connected to any member of a replica
+set, \fI\%--discover\fP all non\-\fIhidden members\fP of the replica set. When connected to a \fBmongos\fP,
+\fI\%mongostat\fP will return data from all \fIshards\fP in the cluster. If a replica set provides a shard in the
+sharded cluster, \fI\%mongostat\fP will report on non\-hidden
+members of that replica set.
+.sp
+The \fI\%mongostat --host\fP option is not required but
+potentially useful in this case.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-discover
-discover nodes and display stats for all
+.B \-\-all
+Configures \fI\%mongostat\fP to return all optional \fI\%fields\fP.
+.UNINDENT
+.INDENT 0.0
.TP
-.B \-\-all
-all optional fields
-.SH "FIELDS"
+.B <sleeptime>
+The final argument is the length of time, in seconds, that
+\fI\%mongostat\fP waits in between calls. By default \fI\%mongostat\fP
+returns one call every second.
+.sp
+\fI\%mongostat\fP returns values that reflect the operations
+over a 1 second period. For values of \fB<sleeptime>\fP greater
+than 1, \fI\%mongostat\fP averages data to reflect average
+operations per second.
+.UNINDENT
+.SH FIELDS
+.sp
+\fI\%mongostat\fP returns values that reflect the operations over a
+1 second period. When \fBmongostat <sleeptime>\fP has a value
+greater than 1, \fI\%mongostat\fP averages the statistics to reflect
+average operations per second.
+.sp
+\fI\%mongostat\fP outputs the following fields:
+.INDENT 0.0
.TP
.B inserts
-# of inserts per second
+The number of objects inserted into the database per second. If
+followed by an asterisk (e.g. \fB*\fP), the datum refers to a
+replicated operation.
+.UNINDENT
+.INDENT 0.0
.TP
.B query
-# of queries per second
+The number of query operations per second.
+.UNINDENT
+.INDENT 0.0
.TP
.B update
-# of updates per second
+The number of update operations per second.
+.UNINDENT
+.INDENT 0.0
.TP
.B delete
-# of deletes per second
+The number of delete operations per second.
+.UNINDENT
+.INDENT 0.0
.TP
.B getmore
-# of get mores (cursor batch) per second
+The number of get more (i.e. cursor batch) operations per second.
+.UNINDENT
+.INDENT 0.0
.TP
.B command
-# of commands per second
+The number of commands per second. On \fIslave\fP and
+\fIsecondary\fP systems, \fI\%mongostat\fP presents two values
+separated by a pipe character (e.g. \fB|\fP), in the form of
+\fBlocal|replicated\fP commands.
+.UNINDENT
+.INDENT 0.0
.TP
.B flushes
-# of fsync flushes per second
+The number of \fIfsync\fP operations per second.
+.UNINDENT
+.INDENT 0.0
.TP
.B mapped
-amount of data mmaped (total data size) megabytes
+The total amount of data mapped in megabytes. This is the total
+data size at the time of the last \fI\%mongostat\fP call.
+.UNINDENT
+.INDENT 0.0
.TP
-.B visze
-virtual size of process in megabytes
+.B size
+The amount of (virtual) memory in megabytes used by the process at
+the time of the last \fI\%mongostat\fP call.
+.UNINDENT
+.INDENT 0.0
.TP
.B res
-resident size of process in megabytes
+The amount of (resident) memory in megabytes used by the process at
+the time of the last \fI\%mongostat\fP call.
+.UNINDENT
+.INDENT 0.0
.TP
.B faults
-# of pages faults per sec (linux only)
+Changed in version 2.1.
+.sp
+The number of page faults per second.
+.sp
+Before version 2.1 this value was only provided for MongoDB
+instances running on Linux hosts.
+.UNINDENT
+.INDENT 0.0
.TP
.B locked
-percent of time in global write lock
+The percent of time in a global write lock.
+.sp
+Changed in version 2.2: The \fBlocked db\fP field replaces the \fBlocked %\fP field to
+more appropriate data regarding the database specific locks in
+version 2.2.
+.UNINDENT
+.INDENT 0.0
.TP
-.B idx
-percent of btree page misses (sampled)
+.B locked db
+New in version 2.2.
+.sp
+The percent of time in the per\-database context\-specific
+lock. \fI\%mongostat\fP will report the database that has spent
+the most time since the last \fI\%mongostat\fP call with a write
+lock.
+.sp
+This value represents the amount of time that the listed database
+spent in a locked state \fIcombined\fP with the time that the
+\fBmongod\fP spent in the global lock. Because of this, and
+the sampling method, you may see some values greater than 100%.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B idx miss
+The percent of index access attempts that required a page fault
+to load a btree node. This is a sampled value.
+.UNINDENT
+.INDENT 0.0
.TP
.B qr
-queue lengths for clients waiting (read|write)
+The length of the queue of clients waiting to read data from the
+MongoDB instance.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B qw
+The length of the queue of clients waiting to write data from the
+MongoDB instance.
+.UNINDENT
+.INDENT 0.0
.TP
.B ar
-active clients (read|write)
+The number of active clients performing read operations.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B aw
+The number of active clients performing write operations.
+.UNINDENT
+.INDENT 0.0
.TP
.B netIn
-network traffic in - bits
+The amount of network traffic, in \fIbytes\fP, received by the MongoDB instance.
+.sp
+This includes traffic from \fI\%mongostat\fP itself.
+.UNINDENT
+.INDENT 0.0
.TP
.B netOut
-network traffic out - bits
+The amount of network traffic, in \fIbytes\fP, sent by the MongoDB instance.
+.sp
+This includes traffic from \fI\%mongostat\fP itself.
+.UNINDENT
+.INDENT 0.0
.TP
.B conn
-number of open connections
-.SH "COPYRIGHT"
-.PP
-Copyright 2011 10gen
-.SH "SEE ALSO"
-For more information, please refer to the mongostat page in the MongoDB manual, available at http://dochub.mongodb.org/core/mongostatmanpage
-.SH "AUTHOR"
-Eliot Horowitz
+The total number of open connections.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B set
+The name, if applicable, of the replica set.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B repl
+The replication status of the node.
+.TS
+center;
+|l|l|.
+_
+T{
+\fBValue\fP
+T} T{
+\fBReplication Type\fP
+T}
+_
+T{
+M
+T} T{
+\fImaster\fP
+T}
+_
+T{
+SEC
+T} T{
+\fIsecondary\fP
+T}
+_
+T{
+REC
+T} T{
+recovering
+T}
+_
+T{
+UNK
+T} T{
+unknown
+T}
+_
+T{
+SLV
+T} T{
+\fIslave\fP
+T}
+_
+.TE
+.UNINDENT
+.SH USAGE
+.sp
+In the first example, \fI\%mongostat\fP will return data every
+second for 20 seconds. \fI\%mongostat\fP collects data from the
+\fBmongod\fP instance running on the localhost interface on
+port 27017. All of the following invocations produce identical
+behavior:
+.sp
+.nf
+.ft C
+mongostat \-\-rowcount 20 1
+mongostat \-\-rowcount 20
+mongostat \-n 20 1
+mongostat \-n 20
+.ft P
+.fi
+.sp
+In the next example, \fI\%mongostat\fP returns data every 5 minutes
+(or 300 seconds) for as long as the program runs. \fI\%mongostat\fP
+collects data from the \fBmongod\fP instance running on the
+localhost interface on port \fB27017\fP. Both of the following
+invocations produce identical behavior.
+.sp
+.nf
+.ft C
+mongostat \-\-rowcount 0 300
+mongostat \-n 0 300
+mongostat 300
+.ft P
+.fi
+.sp
+In the following example, \fI\%mongostat\fP returns data every 5
+minutes for an hour (12 times.) \fI\%mongostat\fP collects data
+from the \fBmongod\fP instance running on the localhost interface
+on port 27017. Both of the following invocations produce identical
+behavior.
+.sp
+.nf
+.ft C
+mongostat \-\-rowcount 12 300
+mongostat \-n 12 300
+.ft P
+.fi
+.sp
+In many cases, using the \fI\%--discover\fP
+will help provide a more complete snapshot of the state of an entire
+group of machines. If a \fBmongos\fP process connected to a
+\fIsharded cluster\fP is running on port \fB27017\fP of the local
+machine, you can use the following form to return statistics from all
+members of the cluster:
+.sp
+.nf
+.ft C
+mongostat \-\-discover
+.ft P
+.fi
+.SH AUTHOR
+MongoDB Documentation Project
+.SH COPYRIGHT
+2011-2013, 10gen, Inc.
+.\" Generated by docutils manpage writer.
+.
diff --git a/debian/mongotop.1 b/debian/mongotop.1
new file mode 100755
index 00000000000..a949893193d
--- /dev/null
+++ b/debian/mongotop.1
@@ -0,0 +1,304 @@
+.TH "MONGOTOP" "1" "March 14, 2013" "2.2.3" "mongodb-manual"
+.SH NAME
+mongotop \- MongoDB
+.
+.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
+..
+.\" Man page generated from reStructuredText.
+.
+.SH SYNOPSIS
+.sp
+\fI\%mongotop\fP provides a method to track the amount of time a
+MongoDB instance spends reading and writing data. \fI\%mongotop\fP
+provides statistics on a per\-collection level. By default,
+\fI\%mongotop\fP returns values every second.
+.IP "See also"
+.sp
+For more information about monitoring MongoDB, see
+\fB/administration/monitoring\fP.
+.sp
+For additional background on various other MongoDB status outputs
+see:
+.INDENT 0.0
+.IP \(bu 2
+\fB/reference/server\-status\fP
+.IP \(bu 2
+\fB/reference/replica\-status\fP
+.IP \(bu 2
+\fB/reference/database\-statistics\fP
+.IP \(bu 2
+\fB/reference/collection\-statistics\fP
+.UNINDENT
+.sp
+For an additional utility that provides MongoDB metrics
+see "\fBmongostat\fP."
+.RE
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B mongotop
+.UNINDENT
+.INDENT 0.0
+.TP
+.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 the
+option multiple times, (e.g. \fB\-vvvvv\fP.)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-version
+Print the version of the \fI\%mongotop\fP utility and exit.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-host <hostname><:port>
+Specifies a resolvable hostname for the \fBmongod\fP from which you
+want to export data. By default \fI\%mongotop\fP attempts to
+connect to a MongoDB process running on the localhost port number
+\fB27017\fP.
+.sp
+Optionally, specify a port number to connect a MongoDB instance
+running on a port other than \fB27017\fP.
+.sp
+To connect to a replica set, you can specify the replica set seed
+name, and a seed list of set members, in the following format:
+.sp
+.nf
+.ft C
+<replica_set_name>/<hostname1><:port>,<hostname2:<port>,...
+.ft P
+.fi
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-port <port>
+Specifies the port number, if the MongoDB instance is not running on
+the standard port. (i.e. \fB27017\fP) You may also specify a port
+number using the \fI\%mongotop --host\fP command.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-ipv6
+Enables IPv6 support that allows \fI\%mongotop\fP to connect
+to the MongoDB instance using an IPv6 network. All MongoDB programs
+and processes, including \fI\%mongotop\fP, disable IPv6
+support by default.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-username <username>, \-u <username>
+Specifies a username to authenticate to the MongoDB instance, if
+your database requires authentication. Use in conjunction with the
+\fI\%mongotop\fP option to supply a
+password.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-password <password>, \-p <password>
+Specifies a password to authenticate to the MongoDB instance. Use
+in conjunction with the \fI\%--username\fP
+option to supply a username.
+.sp
+If you specify a \fI\%--username\fP without
+the \fI\%--password\fP option, \fI\%mongotop\fP will prompt
+for a password interactively.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-authenticationDatabase <dbname>
+New in version 2.4.
+.sp
+Specifies the database that holds the user\(aqs (e.g
+\fI\%--username\fP) credentials.
+.sp
+By default, \fI\%mongotop\fP assumes that the database specified to the
+\fI\-\-db\fP argument holds the user\(aqs credentials, unless you
+specify \fI\%--authenticationDatabase\fP.
+.sp
+See \fBuserSource\fP,
+\fB/reference/privilege\-documents\fP and
+\fB/reference/user\-privileges\fP for more information about
+delegated authentication in MongoDB.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-authenticationMechanism <name>
+New in version 2.4.
+.sp
+Specifies the authentication mechanism. By default, the
+authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB
+challenge/response authentication mechanism. In the MongoDB Subscriber Edition,
+\fI\%mongotop\fP also includes support for \fBGSSAPI\fP to handle
+Kerberos authentication.
+.sp
+See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP
+for more information about Kerberos authentication.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-locks
+New in version 2.2.
+.sp
+Toggles the mode of \fI\%mongotop\fP to report on use of
+per\-database \fIlocks\fP. These data are useful for
+measuring concurrent operations and lock percentage.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B <sleeptime>
+The final argument is the length of time, in seconds, that
+\fI\%mongotop\fP waits in between calls. By default
+\fI\%mongotop\fP returns data every second.
+.UNINDENT
+.SH FIELDS
+.sp
+\fI\%mongotop\fP returns time values specified in milliseconds
+(ms.)
+.sp
+\fI\%mongotop\fP only reports active namespaces or databases,
+depending on the \fI\%--locks\fP option. If you don\(aqt see a database
+or collection, it has received no recent activity. You can issue a
+simple operation in the \fBmongo\fP shell to generate activity to
+affect the output of \fI\%mongotop\fP.
+.INDENT 0.0
+.TP
+.B mongotop.ns
+Contains the database namespace, which combines the database name
+and collection.
+.sp
+Changed in version 2.2: If you use the \fI\%--locks\fP, the \fI\%ns\fP field does not
+appear in the \fI\%mongotop\fP output.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B mongotop.db
+New in version 2.2.
+.sp
+Contains the name of the database. The database named \fB.\fP refers
+to the global lock, rather than a specific database.
+.sp
+This field does not appear unless you have invoked
+\fI\%mongotop\fP with the \fI\%--locks\fP option.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B mongotop.total
+Provides the total amount of time that this \fBmongod\fP spent
+operating on this namespace.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B mongotop.read
+Provides the amount of time that this \fBmongod\fP spent
+performing read operations on this namespace.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B mongotop.write
+Provides the amount of time that this \fBmongod\fP spent
+performing write operations on this namespace.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B mongotop.<timestamp>
+Provides a time stamp for the returned data.
+.UNINDENT
+.SH USE
+.sp
+By default \fI\%mongotop\fP connects to the MongoDB instance
+running on the localhost port \fB27017\fP. However, \fI\%mongotop\fP can optionally
+connect to remote \fBmongod\fP
+instances. See the \fI\%mongotop options\fP for more
+information.
+.sp
+To force \fI\%mongotop\fP to return less frequently specify a number, in
+seconds at the end of the command. In this example, \fI\%mongotop\fP will
+return every 15 seconds.
+.sp
+.nf
+.ft C
+mongotop 15
+.ft P
+.fi
+.sp
+This command produces the following output:
+.sp
+.nf
+.ft C
+connected to: 127.0.0.1
+
+ ns total read write 2012\-08\-13T15:45:40
+test.system.namespaces 0ms 0ms 0ms
+ local.system.replset 0ms 0ms 0ms
+ local.system.indexes 0ms 0ms 0ms
+ admin.system.indexes 0ms 0ms 0ms
+ admin. 0ms 0ms 0ms
+
+ ns total read write 2012\-08\-13T15:45:55
+test.system.namespaces 0ms 0ms 0ms
+ local.system.replset 0ms 0ms 0ms
+ local.system.indexes 0ms 0ms 0ms
+ admin.system.indexes 0ms 0ms 0ms
+ admin. 0ms 0ms 0ms
+.ft P
+.fi
+.sp
+To return a \fI\%mongotop\fP report every 5 minutes, use the
+following command:
+.sp
+.nf
+.ft C
+mongotop 300
+.ft P
+.fi
+.sp
+To report the use of per\-database locks, use \fI\%mongotop --locks\fP,
+which produces the following output:
+.sp
+.nf
+.ft C
+$ mongotop \-\-locks
+connected to: 127.0.0.1
+
+ db total read write 2012\-08\-13T16:33:34
+ local 0ms 0ms 0ms
+ admin 0ms 0ms 0ms
+ . 0ms 0ms 0ms
+.ft P
+.fi
+.SH AUTHOR
+MongoDB Documentation Project
+.SH COPYRIGHT
+2011-2013, 10gen, Inc.
+.\" Generated by docutils manpage writer.
+.