~evarlast/ubuntu/utopic/mongodb/upstart-workaround-debian-bug-718702

« back to all changes in this revision

Viewing changes to debian/manpages/mongod.1

  • Committer: Package Import Robot
  • Author(s): James Page, James Page, Robie Basak
  • Date: 2013-05-29 17:44:42 UTC
  • mfrom: (44.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20130529174442-z0a4qmoww4y0t458
Tags: 1:2.4.3-1ubuntu1
[ James Page ]
* Merge from Debian unstable, remaining changes:
  - Enable SSL support:
    + d/control: Add libssl-dev to BD's.
    + d/rules: Enabled --ssl option.
    + d/mongodb.conf: Add example SSL configuration options.
  - d/mongodb-server.mongodb.upstart: Add upstart configuration.
  - d/rules: Don't strip binaries during scons build for Ubuntu.
  - d/control: Add armhf to target archs.
  - d/p/SConscript.client.patch: fixup install of client libraries.
  - d/p/0010-install-libs-to-usr-lib-not-usr-lib64-Closes-588557.patch:
    Install libraries to lib not lib64.
* Dropped changes:
  - d/p/arm-support.patch: Included in Debian.
  - d/p/double-alignment.patch: Included in Debian.
  - d/rules,control: Debian also builds with avaliable system libraries
    now.
* Fix FTBFS due to gcc and boost upgrades in saucy:
  - d/p/0008-ignore-unused-local-typedefs.patch: Add -Wno-unused-typedefs
    to unbreak building with g++-4.8.
  - d/p/0009-boost-1.53.patch: Fixup signed/unsigned casting issue.

[ Robie Basak ]
* d/p/0011-Use-a-signed-char-to-store-BSONType-enumerations.patch: Fixup
  build failure on ARM due to missing signed'ness of char cast.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.\" Documentation for the MongoDB shell
2
 
.TH MONGOD "1" "June 2009" "10gen" "Mongo Database"
3
 
.SH "NAME"
4
 
mongod \- the Mongo Daemon
5
 
.SH "SYNOPSIS"
6
 
.SH "DESCRIPTION"
7
 
.PP
8
 
\fBmongod\fR
9
 
is a core MongoDB daemon. You are not supposed to call it directly, please refer to the wiki if necessary.
10
 
.SH "COPYRIGHT"
11
 
.PP
12
 
Copyright 2007\-2009 10gen
13
 
.SH "SEE ALSO"
14
 
For more information, please refer to the MongoDB wiki, available at http://www.mongodb.org.
15
 
.SH "AUTHOR"
16
 
Antonin Kral
 
1
.TH "MONGOD" "1" "March 14, 2013" "2.2.3" "mongodb-manual"
 
2
.SH NAME
 
3
mongod \- MongoDB Server
 
4
.
 
5
.nr rst2man-indent-level 0
 
6
.
 
7
.de1 rstReportMargin
 
8
\\$1 \\n[an-margin]
 
9
level \\n[rst2man-indent-level]
 
10
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
 
11
-
 
12
\\n[rst2man-indent0]
 
13
\\n[rst2man-indent1]
 
14
\\n[rst2man-indent2]
 
15
..
 
16
.de1 INDENT
 
17
.\" .rstReportMargin pre:
 
18
. RS \\$1
 
19
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
 
20
. nr rst2man-indent-level +1
 
21
.\" .rstReportMargin post:
 
22
..
 
23
.de UNINDENT
 
24
. RE
 
25
.\" indent \\n[an-margin]
 
26
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
 
27
.nr rst2man-indent-level -1
 
28
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
 
29
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
 
30
..
 
31
.\" Man page generated from reStructuredText.
 
32
.
 
33
.SH SYNOPSIS
 
34
.sp
 
35
\fI\%mongod\fP is the primary daemon process for the MongoDB
 
36
system. It handles data requests, manages data format, and performs
 
37
background management operations.
 
38
.sp
 
39
This document provides a complete overview of all command line options
 
40
for \fI\%mongod\fP. These options are primarily useful for testing
 
41
purposes. In common operation, use the \fBconfiguration file
 
42
options\fP to control the behavior of
 
43
your database, which is fully capable of all operations described
 
44
below.
 
45
.SH OPTIONS
 
46
.INDENT 0.0
 
47
.TP
 
48
.B mongod
 
49
.UNINDENT
 
50
.INDENT 0.0
 
51
.TP
 
52
.B \-\-help, \-h
 
53
Returns a basic help and usage text.
 
54
.UNINDENT
 
55
.INDENT 0.0
 
56
.TP
 
57
.B \-\-version
 
58
Returns the version of the \fI\%mongod\fP daemon.
 
59
.UNINDENT
 
60
.INDENT 0.0
 
61
.TP
 
62
.B \-\-config <filename>, \-f <filename>
 
63
Specifies a configuration file, that you can use to specify
 
64
runtime\-configurations. While the options are equivalent and
 
65
accessible via the other command line arguments, the configuration
 
66
file is the preferred method for runtime configuration of
 
67
mongod. See the "\fB/reference/configuration\-options\fP" document
 
68
for more information about these options.
 
69
.UNINDENT
 
70
.INDENT 0.0
 
71
.TP
 
72
.B \-\-verbose, \-v
 
73
Increases the amount of internal reporting returned on standard
 
74
output or in the log file specified by \fI\%--logpath\fP. Use the
 
75
\fB\-v\fP form to control the level of verbosity by including the
 
76
option multiple times, (e.g. \fB\-vvvvv\fP.)
 
77
.UNINDENT
 
78
.INDENT 0.0
 
79
.TP
 
80
.B \-\-quiet
 
81
Runs the \fI\%mongod\fP instance in a quiet mode that attempts to limit
 
82
the amount of output. This option suppresses:
 
83
.INDENT 7.0
 
84
.IP \(bu 2
 
85
output from \fIdatabase commands\fP,
 
86
including \fBdrop\fP, \fBdropIndexes\fP,
 
87
\fBdiagLogging\fP, \fBvalidate\fP, and
 
88
\fBclean\fP.
 
89
.IP \(bu 2
 
90
replication activity.
 
91
.IP \(bu 2
 
92
connection accepted events.
 
93
.IP \(bu 2
 
94
connection closed events.
 
95
.UNINDENT
 
96
.UNINDENT
 
97
.INDENT 0.0
 
98
.TP
 
99
.B \-\-port <port>
 
100
Specifies a TCP port for the \fI\%mongod\fP to listen for client
 
101
connections. By default \fI\%mongod\fP listens for connections on
 
102
port 27017.
 
103
.sp
 
104
UNIX\-like systems require root privileges to use ports with numbers
 
105
lower than 1024.
 
106
.UNINDENT
 
107
.INDENT 0.0
 
108
.TP
 
109
.B \-\-bind_ip <ip address>
 
110
The IP address that the \fI\%mongod\fP process will bind to and
 
111
listen for connections. By default \fI\%mongod\fP listens for
 
112
connections on the localhost (i.e. \fB127.0.0.1\fP address.) You may
 
113
attach \fI\%mongod\fP to any interface; however, if you attach
 
114
\fI\%mongod\fP to a publicly accessible interface ensure that
 
115
you have implemented proper authentication and/or firewall
 
116
restrictions to protect the integrity of your database.
 
117
.UNINDENT
 
118
.INDENT 0.0
 
119
.TP
 
120
.B \-\-maxConns <number>
 
121
Specifies the maximum number of simultaneous connections that
 
122
\fI\%mongod\fP will accept. This setting will have no effect if
 
123
it is higher than your operating system\(aqs configured maximum
 
124
connection tracking threshold.
 
125
.IP Note
 
126
You cannot set \fBmaxConns\fP to a value higher
 
127
than \fI20000\fP.
 
128
.RE
 
129
.UNINDENT
 
130
.INDENT 0.0
 
131
.TP
 
132
.B \-\-objcheck
 
133
Forces the \fI\%mongod\fP to validate all requests from clients
 
134
upon receipt to ensure that clients never insert invalid documents
 
135
into the database. For objects with a high degree of sub\-document
 
136
nesting, \fI\%--objcheck\fP can have a small impact on
 
137
performance. You can set \fI\%--noobjcheck\fP to disable object
 
138
checking at run\-time.
 
139
.sp
 
140
Changed in version 2.4: MongoDB enables \fI\%--objcheck\fP by default, to prevent any
 
141
client from inserting malformed or invalid BSON into a MongoDB
 
142
database.
 
143
.UNINDENT
 
144
.INDENT 0.0
 
145
.TP
 
146
.B \-\-noobjcheck
 
147
New in version 2.4.
 
148
.sp
 
149
Disables the default document validation that MongoDB performs on all
 
150
incoming BSON documents.
 
151
.UNINDENT
 
152
.INDENT 0.0
 
153
.TP
 
154
.B \-\-logpath <path>
 
155
Specify a path for the log file that will hold all diagnostic
 
156
logging information.
 
157
.sp
 
158
Unless specified, \fI\%mongod\fP will output all log information
 
159
to the standard output. Additionally, unless you also specify
 
160
\fI\%--logappend\fP, the logfile will be overwritten when the
 
161
process restarts.
 
162
.IP Note
 
163
The behavior of the logging system may change in the near
 
164
future in response to the \fI\%SERVER-4499\fP case.
 
165
.RE
 
166
.UNINDENT
 
167
.INDENT 0.0
 
168
.TP
 
169
.B \-\-logappend
 
170
When specified, this option ensures that \fI\%mongod\fP appends
 
171
new entries to the end of the logfile rather than overwriting the
 
172
content of the log when the process restarts.
 
173
.UNINDENT
 
174
.INDENT 0.0
 
175
.TP
 
176
.B \-\-syslog
 
177
New in version 2.1.0.
 
178
.sp
 
179
Sends all logging output to the host\(aqs \fIsyslog\fP system rather
 
180
than to standard output or a log file as with \fI\%--logpath\fP.
 
181
.IP Warning
 
182
You cannot use \fI\%--syslog\fP with \fI\%--logpath\fP.
 
183
.RE
 
184
.UNINDENT
 
185
.INDENT 0.0
 
186
.TP
 
187
.B \-\-pidfilepath <path>
 
188
Specify a file location to hold the "\fIPID\fP" or process ID of
 
189
the \fI\%mongod\fP process. Useful for tracking the
 
190
\fI\%mongod\fP process in combination with the \fI\%mongod --fork\fP
 
191
option.
 
192
.sp
 
193
Without a specified \fI\%--pidfilepath\fP option,
 
194
\fBmongos\fP creates no PID file.
 
195
.UNINDENT
 
196
.INDENT 0.0
 
197
.TP
 
198
.B \-\-keyFile <file>
 
199
Specify the path to a key file to store authentication
 
200
information. This option is only useful for the connection between
 
201
replica set members.
 
202
.IP "See also"
 
203
.sp
 
204
"\fIReplica Set Security\fP"
 
205
and "\fB/administration/replica\-sets\fP."
 
206
.RE
 
207
.UNINDENT
 
208
.INDENT 0.0
 
209
.TP
 
210
.B \-\-nounixsocket
 
211
Disables listening on the UNIX socket. Unless set to false,
 
212
\fI\%mongod\fP and \fBmongos\fP provide a UNIX\-socket.
 
213
.UNINDENT
 
214
.INDENT 0.0
 
215
.TP
 
216
.B \-\-unixSocketPrefix <path>
 
217
Specifies a path for the UNIX socket. Unless this option has a
 
218
value, \fI\%mongod\fP and \fBmongos\fP, create a socket
 
219
with the \fB/tmp\fP as a prefix.
 
220
.UNINDENT
 
221
.INDENT 0.0
 
222
.TP
 
223
.B \-\-fork
 
224
Enables a \fIdaemon\fP mode for \fI\%mongod\fP that runs the
 
225
process to the background. This is the normal mode of operation, in
 
226
production and production\-like environments, but may \fInot\fP be
 
227
desirable for testing.
 
228
.UNINDENT
 
229
.INDENT 0.0
 
230
.TP
 
231
.B \-\-auth
 
232
Enables database authentication for users connecting from remote
 
233
hosts. configure users via the \fBmongo shell shell\fP. If no users exist, the localhost interface
 
234
will continue to have access to the database until the you create
 
235
the first user.
 
236
.sp
 
237
See the \fBSecurity and Authentication\fP
 
238
page for more information regarding this functionality.
 
239
.UNINDENT
 
240
.INDENT 0.0
 
241
.TP
 
242
.B \-\-cpu
 
243
Forces \fI\%mongod\fP to report the percentage of CPU time in
 
244
write lock. \fI\%mongod\fP generates output every four
 
245
seconds. MongoDB writes this data to standard output or the logfile
 
246
if using the \fBlogpath\fP option.
 
247
.UNINDENT
 
248
.INDENT 0.0
 
249
.TP
 
250
.B \-\-dbpath <path>
 
251
Specify a directory for the \fI\%mongod\fP instance to store its
 
252
data. Typical locations include: \fB/srv/mongodb\fP,
 
253
\fB/var/lib/mongodb\fP or \fB/opt/mongodb\fP
 
254
.sp
 
255
Unless specified, \fI\%mongod\fP will look for data files in the
 
256
default \fB/data/db\fP directory. (Windows systems use the
 
257
\fB\edata\edb\fP directory.) If you installed using a package
 
258
management system. Check the \fB/etc/mongodb.conf\fP file provided by
 
259
your packages to see the configuration of the \fBdbpath\fP.
 
260
.UNINDENT
 
261
.INDENT 0.0
 
262
.TP
 
263
.B \-\-diaglog <value>
 
264
Creates a very verbose, \fIdiagnostic log\fP for troubleshooting
 
265
and recording various errors. MongoDB writes these log files in the
 
266
\fBdbpath\fP directory in a series of files that begin with
 
267
the string \fBdiaglog\fP and end with the initiation time of the
 
268
logging as a hex string.
 
269
.sp
 
270
The specified value configures the level of verbosity. Possible
 
271
values, and their impact are as follows.
 
272
.TS
 
273
center;
 
274
|l|l|.
 
275
_
 
276
T{
 
277
\fBValue\fP
 
278
T}      T{
 
279
\fBSetting\fP
 
280
T}
 
281
_
 
282
T{
 
283
0
 
284
T}      T{
 
285
off. No logging.
 
286
T}
 
287
_
 
288
T{
 
289
1
 
290
T}      T{
 
291
Log write operations.
 
292
T}
 
293
_
 
294
T{
 
295
2
 
296
T}      T{
 
297
Log read operations.
 
298
T}
 
299
_
 
300
T{
 
301
3
 
302
T}      T{
 
303
Log both read and write operations.
 
304
T}
 
305
_
 
306
T{
 
307
7
 
308
T}      T{
 
309
Log write and some read operations.
 
310
T}
 
311
_
 
312
.TE
 
313
.sp
 
314
You can use the \fBmongosniff\fP tool to replay this output
 
315
for investigation. Given a typical diaglog file, located at
 
316
\fB/data/db/diaglog.4f76a58c\fP, you might use a command in the
 
317
following form to read these files:
 
318
.sp
 
319
.nf
 
320
.ft C
 
321
mongosniff \-\-source DIAGLOG /data/db/diaglog.4f76a58c
 
322
.ft P
 
323
.fi
 
324
.sp
 
325
\fI\%--diaglog\fP is for internal use and not intended for most
 
326
users.
 
327
.IP Warning
 
328
Setting the diagnostic level to \fB0\fP will cause \fI\%mongod\fP
 
329
to stop writing data to the \fIdiagnostic log\fP file. However,
 
330
the \fI\%mongod\fP instance will continue to keep the file open,
 
331
even if it is no longer writing data to the file.  If you want to
 
332
rename, move, or delete the diagnostic log you must cleanly shut
 
333
down the \fI\%mongod\fP instance before doing so.
 
334
.RE
 
335
.UNINDENT
 
336
.INDENT 0.0
 
337
.TP
 
338
.B \-\-directoryperdb
 
339
Alters the storage pattern of the data directory to store each
 
340
database\(aqs files in a distinct folder. This option will create
 
341
directories within the \fI\%--dbpath\fP named for each directory.
 
342
.sp
 
343
Use this option in conjunction with your file system and device
 
344
configuration so that MongoDB will store data on a number of
 
345
distinct disk devices to increase write throughput or disk
 
346
capacity.
 
347
.UNINDENT
 
348
.INDENT 0.0
 
349
.TP
 
350
.B \-\-journal
 
351
Enables operation journaling to ensure write durability and data
 
352
consistency. \fI\%mongod\fP enables journaling by default on
 
353
64\-bit builds of versions after 2.0.
 
354
.UNINDENT
 
355
.INDENT 0.0
 
356
.TP
 
357
.B \-\-journalOptions <arguments>
 
358
Provides functionality for testing. Not for general use, and may
 
359
affect database integrity.
 
360
.UNINDENT
 
361
.INDENT 0.0
 
362
.TP
 
363
.B \-\-journalCommitInterval <value>
 
364
Specifies the maximum amount of time for \fI\%mongod\fP to allow
 
365
between journal operations. The default value is 100 milliseconds,
 
366
while possible values range from 2 to 300 milliseconds. Lower
 
367
values increase the durability of the journal, at the expense of
 
368
disk performance.
 
369
.sp
 
370
To force \fI\%mongod\fP to commit to the journal more frequently,
 
371
you can specify \fBj:true\fP. When a write operation with \fBj:true\fP
 
372
pending, \fI\%mongod\fP will reduce
 
373
\fBjournalCommitInterval\fP to a third of the set value.
 
374
.UNINDENT
 
375
.INDENT 0.0
 
376
.TP
 
377
.B \-\-ipv6
 
378
Specify this option to enable IPv6 support. This will allow clients
 
379
to connect to \fI\%mongod\fP using IPv6
 
380
networks. \fI\%mongod\fP disables IPv6 support by default in
 
381
\fI\%mongod\fP and all utilities.
 
382
.UNINDENT
 
383
.INDENT 0.0
 
384
.TP
 
385
.B \-\-jsonp
 
386
Permits \fIJSONP\fP access via an HTTP interface. Consider the
 
387
security implications of allowing this activity before enabling
 
388
this option.
 
389
.UNINDENT
 
390
.INDENT 0.0
 
391
.TP
 
392
.B \-\-noauth
 
393
Disable authentication. Currently the default. Exists for future
 
394
compatibility and clarity.
 
395
.UNINDENT
 
396
.INDENT 0.0
 
397
.TP
 
398
.B \-\-nohttpinterface
 
399
Disables the HTTP interface.
 
400
.UNINDENT
 
401
.INDENT 0.0
 
402
.TP
 
403
.B \-\-nojournal
 
404
Disables the durability journaling. By default, \fI\%mongod\fP
 
405
enables journaling in 64\-bit versions after v2.0.
 
406
.UNINDENT
 
407
.INDENT 0.0
 
408
.TP
 
409
.B \-\-noprealloc
 
410
Disables the preallocation of data files. This will shorten the
 
411
start up time in some cases, but can cause significant performance
 
412
penalties during normal operations.
 
413
.UNINDENT
 
414
.INDENT 0.0
 
415
.TP
 
416
.B \-\-noscripting
 
417
Disables the scripting engine.
 
418
.UNINDENT
 
419
.INDENT 0.0
 
420
.TP
 
421
.B \-\-notablescan
 
422
Forbids operations that require a table scan.
 
423
.UNINDENT
 
424
.INDENT 0.0
 
425
.TP
 
426
.B \-\-nssize <value>
 
427
Specifies the default size for namespace files (i.e \fB.ns\fP). This
 
428
option has no impact on the size of existing namespace files. The
 
429
maximum size is 2047 megabytes.
 
430
.sp
 
431
The default value is 16 megabytes; this provides for approximately
 
432
24,000 namespaces. Each collection, as well as each index, counts as
 
433
a namespace.
 
434
.UNINDENT
 
435
.INDENT 0.0
 
436
.TP
 
437
.B \-\-profile <level>
 
438
Changes the level of database profiling, which inserts information
 
439
about operation performance into output of \fI\%mongod\fP or the log
 
440
file. The following levels are available:
 
441
.TS
 
442
center;
 
443
|l|l|.
 
444
_
 
445
T{
 
446
\fBLevel\fP
 
447
T}      T{
 
448
\fBSetting\fP
 
449
T}
 
450
_
 
451
T{
 
452
0
 
453
T}      T{
 
454
Off. No profiling.
 
455
T}
 
456
_
 
457
T{
 
458
1
 
459
T}      T{
 
460
On. Only includes slow operations.
 
461
T}
 
462
_
 
463
T{
 
464
2
 
465
T}      T{
 
466
On. Includes all operations.
 
467
T}
 
468
_
 
469
.TE
 
470
.sp
 
471
Profiling is off by default. Database profiling can impact database
 
472
performance. Enable this option only after careful consideration.
 
473
.UNINDENT
 
474
.INDENT 0.0
 
475
.TP
 
476
.B \-\-quota
 
477
Enables a maximum limit for the number data files each database can
 
478
have. When running with \fI\%--quota\fP, there are a maximum of
 
479
8 data files per database. Adjust the quota with the
 
480
\fI\%--quotaFiles\fP option.
 
481
.UNINDENT
 
482
.INDENT 0.0
 
483
.TP
 
484
.B \-\-quotaFiles <number>
 
485
Modify limit on the number of data files per database. This option
 
486
requires the \fI\%--quota\fP setting. The default value for
 
487
\fI\%--quotaFiles\fP is 8.
 
488
.UNINDENT
 
489
.INDENT 0.0
 
490
.TP
 
491
.B \-\-rest
 
492
Enables the simple \fIREST\fP API.
 
493
.UNINDENT
 
494
.INDENT 0.0
 
495
.TP
 
496
.B \-\-repair
 
497
Runs a repair routine on all databases. This is equivalent
 
498
to shutting down and running the \fBrepairDatabase\fP database
 
499
command on all databases.
 
500
.IP Warning
 
501
In general, if you have an intact copy of your data, such as
 
502
would exist on a very recent backup or an intact member of a
 
503
\fIreplica set\fP, \fBdo not\fP use \fBrepairDatabase\fP
 
504
or related options like \fBdb.repairDatabase()\fP in the
 
505
\fBmongo\fP shell or \fI\%mongod --repair\fP. Restore
 
506
from an intact copy of your data.
 
507
.RE
 
508
.IP Note
 
509
When using \fIjournaling\fP, there is almost never
 
510
any need to run \fBrepairDatabase\fP. In the event of an
 
511
unclean shutdown, the server will be able restore the data files
 
512
to a pristine state automatically.
 
513
.RE
 
514
.sp
 
515
Changed in version 2.1.2.
 
516
.sp
 
517
If you run the repair option \fIand\fP have data in a journal file,
 
518
\fI\%mongod\fP will refuse to start. In these cases you should
 
519
start \fI\%mongod\fP without the \fI\%--repair\fP option to
 
520
allow \fI\%mongod\fP to recover data from the journal. This will
 
521
complete more quickly and will result in a more consistent and
 
522
complete data set.
 
523
.sp
 
524
To continue the repair operation despite the journal files, shut down
 
525
\fI\%mongod\fP cleanly and restart with the \fI\%--repair\fP
 
526
option.
 
527
.IP Note
 
528
\fI\%--repair\fP copies data from the source data files into
 
529
new data files in the \fBrepairpath\fP, and then replaces
 
530
the original data files with the repaired data files. \fIIf\fP
 
531
\fBrepairpath\fP is on the same device as
 
532
\fBdbpath\fP, you \fImay\fP interrupt a \fI\%mongod\fP
 
533
running \fI\%--repair\fP without affecting the integrity of
 
534
the data set.
 
535
.RE
 
536
.UNINDENT
 
537
.INDENT 0.0
 
538
.TP
 
539
.B \-\-repairpath <path>
 
540
Specifies the root directory containing MongoDB data files, to use
 
541
for the \fI\%--repair\fP operation. Defaults to a \fB_tmp\fP
 
542
directory within the \fBdbpath\fP.
 
543
.UNINDENT
 
544
.INDENT 0.0
 
545
.TP
 
546
.B \-\-setParameter <options>
 
547
New in version 2.4.
 
548
.sp
 
549
Specifies an option to configure on startup.  Specify multiple
 
550
options with multiple \fI\%--setParameter\fP options.  See
 
551
\fB/reference/parameters\fP for full documentation of these
 
552
parameters. The \fBsetParameter\fP database command provides
 
553
access to many of these parameters. \fI\%--setParameter\fP supports the
 
554
following options:
 
555
.INDENT 7.0
 
556
.IP \(bu 2
 
557
\fBenableLocalhostAuthBypass\fP
 
558
.IP \(bu 2
 
559
\fBenableTestCommands\fP
 
560
.IP \(bu 2
 
561
\fBjournalCommitInterval\fP
 
562
.IP \(bu 2
 
563
\fBlogLevel\fP
 
564
.IP \(bu 2
 
565
\fBlogUserIds\fP
 
566
.IP \(bu 2
 
567
\fBnotablescan\fP
 
568
.IP \(bu 2
 
569
\fBquiet\fP
 
570
.IP \(bu 2
 
571
\fBreplApplyBatchSize\fP
 
572
.IP \(bu 2
 
573
\fBreplIndexPrefetch\fP
 
574
.IP \(bu 2
 
575
\fBsupportCompatibilityFormPrivilegeDocuments\fP
 
576
.IP \(bu 2
 
577
\fBsyncdelay\fP
 
578
.IP \(bu 2
 
579
\fBtraceExceptions\fP
 
580
.UNINDENT
 
581
.UNINDENT
 
582
.INDENT 0.0
 
583
.TP
 
584
.B \-\-slowms <value>
 
585
Defines the value of "slow," for the \fI\%--profile\fP
 
586
option. The database logs all slow queries to the log, even when
 
587
the profiler is not turned on. When the database profiler is on,
 
588
\fI\%mongod\fP the profiler writes to the \fBsystem.profile\fP
 
589
collection. See the \fBprofile\fP command for more information on the
 
590
database profiler.
 
591
.UNINDENT
 
592
.INDENT 0.0
 
593
.TP
 
594
.B \-\-smallfiles
 
595
Enables a mode where MongoDB uses a smaller default file
 
596
size.  Specifically, \fI\%--smallfiles\fP reduces the initial
 
597
size for data files and limits them to 512
 
598
megabytes. \fI\%--smallfiles\fP also reduces the size of each
 
599
\fIjournal\fP files from 1 gigabyte to 128 megabytes.
 
600
.sp
 
601
Use \fI\%--smallfiles\fP if you have a large number of databases
 
602
that each holds a small quantity of data. \fI\%--smallfiles\fP can
 
603
lead your \fI\%mongod\fP to create a large number of files,
 
604
which may affect performance for larger databases.
 
605
.UNINDENT
 
606
.INDENT 0.0
 
607
.TP
 
608
.B \-\-shutdown
 
609
Used in \fIcontrol scripts\fP, the
 
610
\fI\%--shutdown\fP will cleanly and safely terminate the
 
611
\fI\%mongod\fP process. When invoking \fI\%mongod\fP with this
 
612
option you must set the \fI\%--dbpath\fP option either directly
 
613
or by way of the \fBconfiguration file\fP and the \fI\%--config\fP
 
614
option.
 
615
.sp
 
616
\fI\%--shutdown\fP is only available on Linux systems.
 
617
.UNINDENT
 
618
.INDENT 0.0
 
619
.TP
 
620
.B \-\-syncdelay <value>
 
621
\fI\%mongod\fP writes data very quickly to the journal, and
 
622
lazily to the data files. \fI\%--syncdelay\fP controls how much
 
623
time can pass before MongoDB flushes data to the \fIdatabase files\fP
 
624
via an \fIfsync\fP operation. The default setting is 60 seconds.
 
625
In almost every situation you should not set this value and use the
 
626
default setting.
 
627
.sp
 
628
The \fBserverStatus\fP command reports the background flush
 
629
thread\(aqs status via the \fBbackgroundFlushing\fP
 
630
field.
 
631
.sp
 
632
\fBsyncdelay\fP has no effect on the \fBjournal\fP
 
633
files or \fBjournaling\fP.
 
634
.IP Warning
 
635
If you set \fI\%--syncdelay\fP to \fB0\fP, MongoDB will not
 
636
sync the memory mapped files to disk. Do not set this value on
 
637
production systems.
 
638
.RE
 
639
.UNINDENT
 
640
.INDENT 0.0
 
641
.TP
 
642
.B \-\-sysinfo
 
643
Returns diagnostic system information and then exits. The
 
644
information provides the page size, the number of physical pages,
 
645
and the number of available physical pages.
 
646
.UNINDENT
 
647
.INDENT 0.0
 
648
.TP
 
649
.B \-\-upgrade
 
650
Upgrades the on\-disk data format of the files specified by the
 
651
\fI\%--dbpath\fP to the latest version, if needed.
 
652
.sp
 
653
This option only affects the operation of \fI\%mongod\fP if the
 
654
data files are in an old format.
 
655
.IP Note
 
656
In most cases you should \fBnot\fP set this value, so you can
 
657
exercise the most control over your upgrade process. See the MongoDB
 
658
\fI\%release notes\fP (on the
 
659
download page) for more information about the upgrade process.
 
660
.RE
 
661
.UNINDENT
 
662
.INDENT 0.0
 
663
.TP
 
664
.B \-\-traceExceptions
 
665
For internal diagnostic use only.
 
666
.UNINDENT
 
667
.SS Replication Options
 
668
.INDENT 0.0
 
669
.TP
 
670
.B \-\-replSet <setname>
 
671
Use this option to configure replication with replica sets. Specify
 
672
a setname as an argument to this set. All hosts must have the same
 
673
set name.
 
674
.IP "See also"
 
675
.sp
 
676
"\fB/replication\fP,"
 
677
"\fB/administration/replica\-sets\fP," and
 
678
"\fB/reference/replica\-configuration\fP"
 
679
.RE
 
680
.UNINDENT
 
681
.INDENT 0.0
 
682
.TP
 
683
.B \-\-oplogSize <value>
 
684
Specifies a maximum size in megabytes for the replication operation
 
685
log (e.g. \fIoplog\fP.) By \fI\%mongod\fP creates an
 
686
\fIoplog\fP based on the maximum amount of space available. For
 
687
64\-bit systems, the op log is typically 5% of available disk space.
 
688
.sp
 
689
Once the \fI\%mongod\fP has created the oplog for the first
 
690
time, changing \fI\%--oplogSize\fP will not affect the size of
 
691
the oplog.
 
692
.UNINDENT
 
693
.INDENT 0.0
 
694
.TP
 
695
.B \-\-fastsync
 
696
In the context of \fIreplica set\fP replication, set this option
 
697
if you have seeded this member with a snapshot of the
 
698
\fIdbpath\fP of another member of the set. Otherwise the
 
699
\fI\%mongod\fP will attempt to perform an initial sync,
 
700
as though the member were a new member.
 
701
.IP Warning
 
702
If the data is not perfectly synchronized \fIand\fP
 
703
\fI\%mongod\fP starts with \fBfastsync\fP, then the
 
704
secondary or slave will be permanently out of sync with the
 
705
primary, which may cause significant consistency problems.
 
706
.RE
 
707
.UNINDENT
 
708
.INDENT 0.0
 
709
.TP
 
710
.B \-\-replIndexPrefetch
 
711
New in version 2.2.
 
712
.sp
 
713
You must use \fI\%--replIndexPrefetch\fP in conjunction with
 
714
\fBreplSet\fP. The default value is \fBall\fP and available
 
715
options are:
 
716
.INDENT 7.0
 
717
.IP \(bu 2
 
718
\fBnone\fP
 
719
.IP \(bu 2
 
720
\fBall\fP
 
721
.IP \(bu 2
 
722
\fB_id_only\fP
 
723
.UNINDENT
 
724
.sp
 
725
By default \fIsecondary\fP members of a \fIreplica set\fP will
 
726
load all indexes related to an operation into memory before
 
727
applying operations from the oplog. You can modify this behavior so
 
728
that the secondaries will only load the \fB_id\fP index. Specify
 
729
\fB_id_only\fP or \fBnone\fP to prevent the \fI\%mongod\fP from
 
730
loading \fIany\fP index into memory.
 
731
.UNINDENT
 
732
.SS Master\-Slave Replication
 
733
.sp
 
734
These options provide access to conventional master\-slave database
 
735
replication. While this functionality remains accessible in MongoDB,
 
736
replica sets are the preferred configuration for database replication.
 
737
.INDENT 0.0
 
738
.TP
 
739
.B \-\-master
 
740
Configures \fI\%mongod\fP to run as a replication
 
741
\fImaster\fP.
 
742
.UNINDENT
 
743
.INDENT 0.0
 
744
.TP
 
745
.B \-\-slave
 
746
Configures \fI\%mongod\fP to run as a replication
 
747
\fIslave\fP.
 
748
.UNINDENT
 
749
.INDENT 0.0
 
750
.TP
 
751
.B \-\-source <host><:port>
 
752
For use with the \fI\%--slave\fP option, the \fB\-\-source\fP option
 
753
designates the server that this instance will replicate.
 
754
.UNINDENT
 
755
.INDENT 0.0
 
756
.TP
 
757
.B \-\-only <arg>
 
758
For use with the \fI\%--slave\fP option, the \fB\-\-only\fP option
 
759
specifies only a single \fIdatabase\fP to replicate.
 
760
.UNINDENT
 
761
.INDENT 0.0
 
762
.TP
 
763
.B \-\-slavedelay <value>
 
764
For use with the \fI\%--slave\fP option, the \fB\-\-slavedelay\fP
 
765
option configures a "delay" in seconds, for this slave to wait to
 
766
apply operations from the \fImaster\fP node.
 
767
.UNINDENT
 
768
.INDENT 0.0
 
769
.TP
 
770
.B \-\-autoresync
 
771
For use with the \fI\%--slave\fP option, the
 
772
\fI\%--autoresync\fP option allows this slave to automatically
 
773
resync if the local data is more than 10 seconds behind the
 
774
master. This option may be problematic if the \fIoplog\fP is too
 
775
small (controlled by the \fI\%--oplogSize\fP option.) If the
 
776
\fIoplog\fP not large enough to store the difference in changes
 
777
between the master\(aqs current state and the state of the slave, this
 
778
node will forcibly resync itself unnecessarily. When you set the If
 
779
the \fI\%--autoresync\fP option the slave will not attempt an
 
780
automatic resync more than once in a ten minute period.
 
781
.UNINDENT
 
782
.SS Sharding Cluster Options
 
783
.INDENT 0.0
 
784
.TP
 
785
.B \-\-configsvr
 
786
Declares that this \fI\%mongod\fP instance serves as the
 
787
\fIconfig database\fP of a sharded cluster. When running with
 
788
this option, clients will not be able to write data to any database
 
789
other than \fBconfig\fP and \fBadmin\fP. The default port for
 
790
\fI\%mongod\fP with this option is \fB27019\fP and
 
791
\fI\%mongod\fP writes all data files to the \fB/configdb\fP
 
792
sub\-directory of the \fI\%--dbpath\fP directory.
 
793
.UNINDENT
 
794
.INDENT 0.0
 
795
.TP
 
796
.B \-\-shardsvr
 
797
Configures this \fI\%mongod\fP instance as a shard in a
 
798
partitioned cluster. The default port for these instances is
 
799
\fB27018\fP.  The only effect of \fI\%--shardsvr\fP is to change
 
800
the port number.
 
801
.UNINDENT
 
802
.INDENT 0.0
 
803
.TP
 
804
.B \-\-noMoveParanoia
 
805
Disables a "paranoid mode" for data writes for chunk migration
 
806
operation. See the
 
807
\fIchunk migration\fP
 
808
and \fBmoveChunk\fP command documentation for more information.
 
809
.sp
 
810
By default \fI\%mongod\fP will save copies of migrated chunks on
 
811
the "from" server during migrations as "paranoid mode." Setting
 
812
this option disables this paranoia.
 
813
.UNINDENT
 
814
.SS SSL Options
 
815
.IP "See"
 
816
.sp
 
817
\fB/administration/ssl\fP for full documentation of
 
818
MongoDB\(aqs support.
 
819
.RE
 
820
.INDENT 0.0
 
821
.TP
 
822
.B \-\-sslOnNormalPorts
 
823
New in version 2.2.
 
824
.IP Note
 
825
The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support
 
826
for SSL. To use SSL you can either compile MongoDB with SSL
 
827
support or use the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for
 
828
more information about SSL and MongoDB.
 
829
.RE
 
830
.sp
 
831
Enables SSL for \fI\%mongod\fP. With \fI\%--sslOnNormalPorts\fP,
 
832
a \fI\%mongod\fP requires SSL encryption for all connections on the
 
833
default MongoDB port, or the port specified by \fI\%--port\fP. By
 
834
default, \fI\%--sslOnNormalPorts\fP is disabled.
 
835
.UNINDENT
 
836
.INDENT 0.0
 
837
.TP
 
838
.B \-\-sslPEMKeyFile <filename>
 
839
New in version 2.2.
 
840
.IP Note
 
841
The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support
 
842
for SSL. To use SSL you can either compile MongoDB with SSL
 
843
support or use the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for
 
844
more information about SSL and MongoDB.
 
845
.RE
 
846
.sp
 
847
Specifies the \fB.pem\fP file that contains both the SSL
 
848
certificate and key. Specify the file name of the \fB.pem\fP
 
849
file using relative or absolute paths
 
850
.sp
 
851
When using \fI\%--sslOnNormalPorts\fP, you must specify
 
852
\fI\%--sslPEMKeyFile\fP.
 
853
.UNINDENT
 
854
.INDENT 0.0
 
855
.TP
 
856
.B \-\-sslPEMKeyPassword <value>
 
857
New in version 2.2.
 
858
.IP Note
 
859
The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support
 
860
for SSL. To use SSL you can either compile MongoDB with SSL
 
861
support or use the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for
 
862
more information about SSL and MongoDB.
 
863
.RE
 
864
.sp
 
865
Specifies the password to de\-crypt the certificate\-key file
 
866
(i.e. \fI\%--sslPEMKeyFile\fP). Only use
 
867
\fI\%--sslPEMKeyPassword\fP if the certificate\-key file is
 
868
encrypted. In all cases, \fI\%mongod\fP will redact the password from
 
869
all logging and reporting output.
 
870
.sp
 
871
Changed in version 2.4: \fI\%--sslPEMKeyPassword\fP is only needed when the private
 
872
key is encrypted. In earlier versions \fI\%mongod\fP would require
 
873
\fI\%--sslPEMKeyPassword\fP whenever using
 
874
\fI\%--sslOnNormalPorts\fP, even when the private key was not
 
875
encrypted.
 
876
.UNINDENT
 
877
.INDENT 0.0
 
878
.TP
 
879
.B \-\-sslCAFile <filename>
 
880
New in version 2.4.
 
881
.IP Note
 
882
The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support
 
883
for SSL. To use SSL you can either compile MongoDB with SSL
 
884
support or use the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for
 
885
more information about SSL and MongoDB.
 
886
.RE
 
887
.sp
 
888
Specifies the \fB.pem\fP file that contains the root certificate
 
889
chain from the Certificate Authority. Specify the file name of the \fB.pem\fP
 
890
file using relative or absolute paths
 
891
.UNINDENT
 
892
.INDENT 0.0
 
893
.TP
 
894
.B \-\-sslCRLFile <filename>
 
895
New in version 2.4.
 
896
.IP Note
 
897
The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support
 
898
for SSL. To use SSL you can either compile MongoDB with SSL
 
899
support or use the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for
 
900
more information about SSL and MongoDB.
 
901
.RE
 
902
.sp
 
903
Specifies the \fB.pem\fP file that contains the Certificate
 
904
Revocation List. Specify the file name of the \fB.pem\fP
 
905
file using relative or absolute paths
 
906
.UNINDENT
 
907
.INDENT 0.0
 
908
.TP
 
909
.B \-\-sslWeakCertificateValidation
 
910
New in version 2.4.
 
911
.IP Note
 
912
The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support
 
913
for SSL. To use SSL you can either compile MongoDB with SSL
 
914
support or use the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for
 
915
more information about SSL and MongoDB.
 
916
.RE
 
917
.sp
 
918
Disables the requirement for SSL certificate validation, that
 
919
\fI\%--sslCAFile\fP enables. With
 
920
\fI\%--sslWeakCertificateValidation\fP, \fI\%mongod\fP will accept
 
921
connections if the client does not present a certificate when
 
922
establishing the connection.
 
923
.sp
 
924
If the client presents a certificate and \fI\%mongod\fP has
 
925
\fI\%--sslWeakCertificateValidation\fP enabled, \fI\%mongod\fP
 
926
will validate the certificate using the root certificate chain
 
927
specified by \fI\%--sslCAFile\fP, and reject clients with invalid
 
928
certificates.
 
929
.sp
 
930
Use \fI\%--sslWeakCertificateValidation\fP if you have a mixed
 
931
deployment that includes clients that do not or cannot present
 
932
certificates to \fI\%mongod\fP.
 
933
.UNINDENT
 
934
.INDENT 0.0
 
935
.TP
 
936
.B \-\-sslFIPSMode
 
937
New in version 2.4.
 
938
.IP Note
 
939
The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support
 
940
for SSL. To use SSL you can either compile MongoDB with SSL
 
941
support or use the MongoDB Subscriber Edition. See \fB/administration/ssl\fP for
 
942
more information about SSL and MongoDB.
 
943
.RE
 
944
.sp
 
945
When specified, \fI\%mongod\fP will use the FIPS mode of the
 
946
installed OpenSSL library. Your system must have a FIPS compliant
 
947
OpenSSL library to use \fI\%--sslFIPSMode\fP.
 
948
.UNINDENT
 
949
.SH USAGE
 
950
.sp
 
951
In common usage, the invocation of \fI\%mongod\fP will resemble the
 
952
following in the context of an initialization or control script:
 
953
.sp
 
954
.nf
 
955
.ft C
 
956
mongod \-\-config /etc/mongodb.conf
 
957
.ft P
 
958
.fi
 
959
.sp
 
960
See the "\fB/reference/configuration\-options\fP" for more information
 
961
on how to configure \fI\%mongod\fP using the configuration file.
 
962
.SH AUTHOR
 
963
MongoDB Documentation Project
 
964
.SH COPYRIGHT
 
965
2011-2013, 10gen, Inc.
 
966
.\" Generated by docutils manpage writer.
 
967
.