Skip to content

Commit a611e30

Browse files
committed
Update program to binary directive
1 parent 6a322d9 commit a611e30

File tree

258 files changed

+2188
-2188
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

258 files changed

+2188
-2188
lines changed

source/administration/backups.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Approaches to Backing Up MongoDB Systems
6767

6868
There are two main methodologies for backing up MongoDB
6969
instances. Creating binary "dumps" of the database using
70-
:program:`mongodump` or creating filesystem level snapshots. Both
70+
:binary:`~bin.mongodump` or creating filesystem level snapshots. Both
7171
methodologies have advantages and disadvantages:
7272

7373
- binary database dumps are comparatively small, because they don't
@@ -83,7 +83,7 @@ methodologies have advantages and disadvantages:
8383

8484
The best option depends on the requirements of your deployment and
8585
disaster recovery needs. Typically, filesystem snapshots are because
86-
of their accuracy and simplicity; however, :program:`mongodump` is a
86+
of their accuracy and simplicity; however, :binary:`~bin.mongodump` is a
8787
viable option used often to generate backups of MongoDB systems.
8888

8989
The following topics provide details and procedures on the two approaches:

source/administration/configuration.txt

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ a package for your operating system, you likely already have a
2626
configuration file located at ``/etc/mongodb.conf``. Confirm this by
2727
checking the content of the ``/etc/init.d/mongod`` or
2828
``/etc/rc.d/mongod`` script to insure that the :term:`control scripts
29-
<control script>` start the :program:`mongod` with the appropriate
29+
<control script>` start the :binary:`~bin.mongod` with the appropriate
3030
configuration file (see below.)
3131

3232
To start MongoDB instance using this configuration issue a command in
@@ -63,7 +63,7 @@ configuration. It makes several assumptions, but consider the
6363
following explanation:
6464

6565
- :setting:`fork` is ``true``, which enables a
66-
:term:`daemon` mode for :program:`mongod`, which detaches (i.e. "forks")
66+
:term:`daemon` mode for :binary:`~bin.mongod`, which detaches (i.e. "forks")
6767
the MongoDB from the current session and allows you to run the
6868
database as a conventional server.
6969

@@ -93,21 +93,21 @@ following explanation:
9393
- :setting:`dbpath` is ``/srv/mongodb``, which
9494
specifies where MongoDB will store its data files. ``/srv/mongodb``
9595
and ``/var/lib/mongodb`` are popular locations. The user account
96-
that :program:`mongod` runs under will need read and write access to this
96+
that :binary:`~bin.mongod` runs under will need read and write access to this
9797
directory.
9898

9999
- :setting:`logpath` is ``/var/log/mongodb/mongod.log``
100-
which is where :program:`mongod` will write its output. If you do not set
101-
this value, :program:`mongod` writes all output to standard output
100+
which is where :binary:`~bin.mongod` will write its output. If you do not set
101+
this value, :binary:`~bin.mongod` writes all output to standard output
102102
(e.g. ``stdout``.)
103103

104104
- :setting:`logappend` is ``true``, which ensures that
105-
:program:`mongod` does not overwrite an existing log file
105+
:binary:`~bin.mongod` does not overwrite an existing log file
106106
following the server start operation.
107107

108108
- :setting:`journal` is ``true``, which enables :term:`journaling <journal>`.
109109
Journaling ensures single instance write-durability. 64-bit builds
110-
of :program:`mongod` enable journaling by default. Thus, this
110+
of :binary:`~bin.mongod` enable journaling by default. Thus, this
111111
setting may be redundant.
112112

113113
Given the default configuration, some of these values may be
@@ -120,7 +120,7 @@ Security Considerations
120120
-----------------------
121121

122122
The following collection of configuration options are useful for
123-
limiting access to a :program:`mongod` instance. Consider the
123+
limiting access to a :binary:`~bin.mongod` instance. Consider the
124124
following:
125125

126126
.. code-block:: cfg
@@ -169,7 +169,7 @@ among all members of the set. Consider the following:
169169
replSet = set0
170170

171171
Use descriptive names for sets. Once configured use the
172-
:program:`mongo` shell to add hosts to the replica set.
172+
:binary:`~bin.mongo` shell to add hosts to the replica set.
173173

174174
.. seealso:: :ref:`Replica set reconfiguration <replica-set-reconfiguration-usage>`.
175175

@@ -185,7 +185,7 @@ following option:
185185
Setting :setting:`keyFile` enables authentication and specifies a key
186186
file for the replica set member use to when authenticating to each
187187
other. The content of the key file is arbitrary, but must be the same
188-
on all members of the :term:`replica set` and :program:`mongos`
188+
on all members of the :term:`replica set` and :binary:`~bin.mongos`
189189
instances that connect to the set. The keyfile must be less than one
190190
kilobyte in size and may only contain characters in the base64 set and
191191
the file must not have group or "world" permissions on UNIX systems.
@@ -205,7 +205,7 @@ following option:
205205
Sharding Configuration
206206
~~~~~~~~~~~~~~~~~~~~~~
207207

208-
Sharding requires a number of :program:`mongod` instances with
208+
Sharding requires a number of :binary:`~bin.mongod` instances with
209209
different configurations. The config servers store the cluster's
210210
metadata, while the cluster distributes data among one or more shard
211211
servers.
@@ -216,7 +216,7 @@ servers.
216216
sets <replica set>`.
217217

218218
To set up one or three "config server" instances as :ref:`normal
219-
<base-config>` :program:`mongod` instances, and then add the following
219+
<base-config>` :binary:`~bin.mongod` instances, and then add the following
220220
configuration option:
221221

222222
.. code-block:: cfg
@@ -229,9 +229,9 @@ configuration option:
229229
This creates a config server running on the private IP address
230230
``10.8.0.12`` on port ``27001``. Make sure that there are no port
231231
conflicts, and that your config server is accessible from all of your
232-
":program:`mongos`" and ":program:`mongod`" instances.
232+
":binary:`~bin.mongos`" and ":binary:`~bin.mongod`" instances.
233233

234-
To set up shards, configure two or more :program:`mongod` instance
234+
To set up shards, configure two or more :binary:`~bin.mongod` instance
235235
using your :ref:`base configuration <base-config>`, adding the
236236
:setting:`shardsvr` setting:
237237

@@ -240,7 +240,7 @@ using your :ref:`base configuration <base-config>`, adding the
240240
shardsvr = true
241241

242242
Finally, to establish the cluster, configure at least one
243-
:program:`mongos` process with the following settings:
243+
:binary:`~bin.mongos` process with the following settings:
244244

245245
.. code-block:: cfg
246246

@@ -251,7 +251,7 @@ You can specify multiple :setting:`configdb` instances by
251251
specifying hostnames and ports in the form of a comma separated
252252
list. In general, avoid modifying the :setting:`chunkSize` from
253253
the default value of 64, [#chunksize]_ and *should* ensure this setting is consistent
254-
among all :program:`mongos` instances.
254+
among all :binary:`~bin.mongos` instances.
255255

256256
.. [#chunksize] :term:`Chunk` size is 64 megabytes by default, which
257257
provides the ideal balance between the most even distribution of
@@ -264,10 +264,10 @@ among all :program:`mongos` instances.
264264
Running Multiple Database Instances on the Same System
265265
------------------------------------------------------
266266

267-
In many cases running multiple instances of :program:`mongod` on a
267+
In many cases running multiple instances of :binary:`~bin.mongod` on a
268268
single system is not recommended. On some types of deployments
269269
[#multimongod]_ and for testing purposes you may need to run more than
270-
one :program:`mongod` on a single system.
270+
one :binary:`~bin.mongod` on a single system.
271271

272272
In these cases, use a :ref:`base configuration <base-config>` for each
273273
instance, but consider the following configuration values:
@@ -278,11 +278,11 @@ instance, but consider the following configuration values:
278278
pidfilepath = /srv/mongodb/db0.pid
279279

280280
The :setting:`dbpath` value controls the location of the
281-
:program:`mongod` instance's data directory. Ensure that each database
281+
:binary:`~bin.mongod` instance's data directory. Ensure that each database
282282
has a distinct and well labeled data directory. The
283-
:setting:`pidfilepath` controls where :program:`mongod` process
283+
:setting:`pidfilepath` controls where :binary:`~bin.mongod` process
284284
places it's :term:`process id <pid>` file. As this tracks the specific
285-
:program:`mongod` file, it is crucial that file be unique and well
285+
:binary:`~bin.mongod` file, it is crucial that file be unique and well
286286
labeled to make it easy to start and stop these processes.
287287

288288
Create additional :term:`control scripts <control script>` and/or
@@ -291,14 +291,14 @@ needed to control these processes.
291291

292292
.. [#multimongod] Single-tenant systems with :term:`SSD` or other high
293293
performance disks may provide acceptable performance levels for
294-
multiple :program:`mongod` instances. Additionally, you may find that
294+
multiple :binary:`~bin.mongod` instances. Additionally, you may find that
295295
multiple databases with small working sets may function acceptably
296296
on a single system.
297297

298298
Diagnostic Configurations
299299
-------------------------
300300

301-
The following configuration options control various :program:`mongod`
301+
The following configuration options control various :binary:`~bin.mongod`
302302
behaviors for diagnostic purposes. The following settings have default
303303
values that tuned for general production purposes:
304304

@@ -327,7 +327,7 @@ needed:
327327
has a value, queries are not profiled.
328328

329329
- :setting:`verbose` enables a verbose logging mode that
330-
modifies :program:`mongod` output and increases logging to include a
330+
modifies :binary:`~bin.mongod` output and increases logging to include a
331331
greater number of events. Only use this option if you are
332332
experiencing an issue that is not reflected in the normal logging
333333
level. If you require additional verbosity, consider the following
@@ -347,13 +347,13 @@ needed:
347347
- :setting:`diaglog` enables :term:`diagnostic logging <diagnostic log>`. Level ``3``
348348
logs all read and write options.
349349

350-
- :setting:`objcheck` forces :program:`mongod` to validate all
350+
- :setting:`objcheck` forces :binary:`~bin.mongod` to validate all
351351
requests from clients upon receipt. Use this option to ensure that
352352
invalid requests are not causing errors, particularly when running a
353353
database with untrusted clients. This option may affect database
354354
performance.
355355

356-
- :setting:`cpu` forces :program:`mongod` to report the percentage of
356+
- :setting:`cpu` forces :binary:`~bin.mongod` to report the percentage of
357357
the last interval spent in :term:`write-lock`. The interval is
358358
typically 4 seconds, and each output line in the log includes both
359359
the actual interval since the last report and the percentage of

source/administration/import-export.txt

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ with the database itself.
2626
.. warning::
2727

2828
Because these tools primarily operate by interacting with a running
29-
:program:`mongod` instance, they can impact the performance of your
29+
:binary:`~bin.mongod` instance, they can impact the performance of your
3030
running database.
3131

3232
Not only do these processes create traffic for a running
@@ -35,10 +35,10 @@ with the database itself.
3535
supplant more frequently accessed data, causing a deterioration in
3636
performance for the database's regular workload.
3737

38-
:program:`mongoimport` and :program:`mongoexport` do not reliably
38+
:binary:`~bin.mongoimport` and :binary:`~bin.mongoexport` do not reliably
3939
preserve all rich :term:`BSON` data types, because :term:`BSON` is
40-
a superset of :term:`JSON`. Thus, :program:`mongoimport` and
41-
:program:`mongoexport` cannot represent :term:`BSON` data
40+
a superset of :term:`JSON`. Thus, :binary:`~bin.mongoimport` and
41+
:binary:`~bin.mongoexport` cannot represent :term:`BSON` data
4242
accurately in :term:`JSON`. As a result data exported or imported
4343
with these tools may lose some measure of fidelity. See
4444
:doc:`/reference/mongodb-extended-json` for more information about
@@ -184,16 +184,16 @@ portion thereof, to a file in a :term:`JSON` or :term:`CSV` format.
184184
If you want to simply copy a database or collection from one
185185
instance to another, consider using the :dbcommand:`copydb`,
186186
:dbcommand:`clone`, or :dbcommand:`cloneCollection` commands, which
187-
may be more suited to this task. The :program:`mongo` shell
187+
may be more suited to this task. The :binary:`~bin.mongo` shell
188188
provides the :method:`db.copyDatabase()` method.
189189

190190
These tools may also be useful for importing data into a MongoDB database
191191
from third party applications.
192192

193-
Collection Export with :program:`mongoexport`
193+
Collection Export with :binary:`~bin.mongoexport`
194194
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
195195

196-
With the :program:`mongoexport` utility you can create a backup
196+
With the :binary:`~bin.mongoexport` utility you can create a backup
197197
file. In the most simple invocation, the command takes the following
198198
form:
199199

@@ -204,7 +204,7 @@ form:
204204
This will export all documents in the collection named
205205
``collection`` into the file ``collection.json``. Without the
206206
output specification (i.e. ":option:`--out collection.json
207-
<mongoexport --out>`",) :program:`mongoexport` writes output to
207+
<mongoexport --out>`",) :binary:`~bin.mongoexport` writes output to
208208
standard output (i.e. "stdout.") You can further narrow the results by
209209
supplying a query filter using the ":option:`--query <mongoexport --query>`"
210210
and limit results to a single database using the
@@ -220,14 +220,14 @@ of ``1``. Enclose the query in single quotes (e.g. ``'``) to ensure
220220
that it does not interact with your shell environment. The resulting
221221
documents will return on standard output.
222222

223-
By default, :program:`mongoexport` returns one :term:`JSON document`
223+
By default, :binary:`~bin.mongoexport` returns one :term:`JSON document`
224224
per MongoDB document. Specify the
225225
":option:`--jsonArray <mongoexport --jsonArray>`" argument to return
226226
the export as a single :term:`JSON` array. Use the ":option:`--csv
227227
<mongoexport --csv>`" file to return the result in CSV (comma
228228
separated values) format.
229229

230-
If your :program:`mongod` instance is not running, you can use the
230+
If your :binary:`~bin.mongod` instance is not running, you can use the
231231
":option:`--dbpath <mongoexport --dbpath>`" option to specify the
232232
location to your MongoDB instance's database files. See the following
233233
example:
@@ -237,8 +237,8 @@ example:
237237
mongoexport --db sales --collection contacts --dbpath /srv/MongoDB/
238238

239239
This reads the data files directly. This locks the data directory to
240-
prevent conflicting writes. The :program:`mongod` process must *not* be
241-
running or attached to these data files when you run :program:`mongoexport`
240+
prevent conflicting writes. The :binary:`~bin.mongod` process must *not* be
241+
running or attached to these data files when you run :binary:`~bin.mongoexport`
242242
in this configuration.
243243

244244
The ":option:`--host <mongoexport --host>`" and ":option:`--port
@@ -249,15 +249,15 @@ to connect to capture the export. Consider the following example:
249249

250250
mongoexport --host mongodb1.example.net --port 37017 --username user --password pass --collection contacts --file mdb1-examplenet.json
251251

252-
On any :program:`mongoexport` command you may, as above specify username and
252+
On any :binary:`~bin.mongoexport` command you may, as above specify username and
253253
password credentials as above.
254254

255-
Collection Import with :program:`mongoimport`
255+
Collection Import with :binary:`~bin.mongoimport`
256256
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
257257

258-
To restore a backup taken with :program:`mongoexport`. Most of the
259-
arguments to :program:`mongoexport` also exist for
260-
:program:`mongoimport`. Consider the following command:
258+
To restore a backup taken with :binary:`~bin.mongoexport`. Most of the
259+
arguments to :binary:`~bin.mongoexport` also exist for
260+
:binary:`~bin.mongoimport`. Consider the following command:
261261

262262
.. code-block:: sh
263263

@@ -266,11 +266,11 @@ arguments to :program:`mongoexport` also exist for
266266
This imports the contents of the file ``collection.json`` into the
267267
collection named ``collection``. If you do not specify a file with
268268
the ":option:`--file <mongoimport --file>`" option,
269-
:program:`mongoimport` accepts input over standard input
269+
:binary:`~bin.mongoimport` accepts input over standard input
270270
(e.g. "stdin.")
271271

272272
If you specify the ":option:`--upsert <mongoimport --upsert>`" option,
273-
all of :program:`mongoimport` operations will attempt to update
273+
all of :binary:`~bin.mongoimport` operations will attempt to update
274274
existing documents in the database and insert other documents. This
275275
option will cause some performance impact depending on your
276276
configuration.
@@ -281,9 +281,9 @@ MongoDB instance is not running, use the ":option:`--dbpath
281281
<mongoimport --dbpath>`" option to specify the location of your
282282
MongoDB instance's database files. Consider using the
283283
":option:`--journal <mongoimport --journal>`" option to ensure that
284-
:program:`mongoimport` records its operations in the journal. The
284+
:binary:`~bin.mongoimport` records its operations in the journal. The
285285
``mongod`` process must *not* be running or attached to these data
286-
files when you run :program:`mongoimport` in this configuration.
286+
files when you run :binary:`~bin.mongoimport` in this configuration.
287287

288288
Use the ":option:`--ignoreBlanks <mongoimport --ignoreBlanks>`" option
289289
to ignore blank fields. For :term:`CSV` and :term:`TSV` imports, this

source/administration/indexes.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ List all Indexes for a Database
258258
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
259259

260260
To return a list of all indexes on all collections in a database, use
261-
the following operation in the :program:`mongo` shell:
261+
the following operation in the :binary:`~bin.mongo` shell:
262262

263263
.. code-block:: javascript
264264

@@ -399,7 +399,7 @@ secondaries while they build the index.
399399

400400
Secondaries will begin building indexes *after* the
401401
:term:`primary` finishes building the index. In :term:`sharded clusters
402-
<sharded cluster>`, the :program:`mongos` will send :method:`ensureIndex()
402+
<sharded cluster>`, the :binary:`~bin.mongos` will send :method:`ensureIndex()
403403
<db.collection.ensureIndex()>` to the primary members of the replica
404404
set for each shard, which then replicate to the secondaries after the
405405
primary finishes building the index.
@@ -413,15 +413,15 @@ the following procedure to build indexes on secondaries:
413413
the following procedure for each replica set that provides each
414414
:term:`shard`.
415415

416-
#. Stop the :program:`mongod` process on one secondary. Restart the
417-
:program:`mongod` process *without* the :option:`--replSet <mongod --replSet>`
416+
#. Stop the :binary:`~bin.mongod` process on one secondary. Restart the
417+
:binary:`~bin.mongod` process *without* the :option:`--replSet <mongod --replSet>`
418418
option and running on a different port. [#different-port]_ This
419419
instance is now in "standalone" mode.
420420

421-
#. Create the new index or rebuild the index on this :program:`mongod`
421+
#. Create the new index or rebuild the index on this :binary:`~bin.mongod`
422422
instance.
423423

424-
#. Restart the :program:`mongod` instance with the
424+
#. Restart the :binary:`~bin.mongod` instance with the
425425
:option:`--replSet <mongod --replSet>` option. Allow replication
426426
to catch up on this member.
427427

@@ -444,7 +444,7 @@ the following procedure to build indexes on secondaries:
444444
time. However, this procedure will only affect one member of the
445445
set at a time rather than *all* secondaries at the same time.
446446

447-
.. [#different-port] By running the :program:`mongod` on a different
447+
.. [#different-port] By running the :binary:`~bin.mongod` on a different
448448
port, you ensure that the other members of the replica set and all
449449
clients will not contact the member while you are building the
450450
index.
@@ -460,11 +460,11 @@ Monitor and Control Index Building
460460
completion of DOCS-162
461461

462462
To see the status of the indexing processes, you can use the
463-
:method:`db.currentOp()` method in the :program:`mongo` shell. The value
463+
:method:`db.currentOp()` method in the :binary:`~bin.mongo` shell. The value
464464
of the ``query`` field and the ``msg`` field will indicate if the
465465
operation is an index build. The ``msg`` field also indicates the
466466
percent of the build that is complete.
467467

468468
You can only terminate a background index build. If you need to
469469
terminate an ongoing index build, You can use the
470-
:method:`db.killOp()` method in the :program:`mongo` shell.
470+
:method:`db.killOp()` method in the :binary:`~bin.mongo` shell.

0 commit comments

Comments
 (0)