Skip to content

Commit bcd9116

Browse files
author
Ed Costello
committed
Merge branch 'master' of git://github.com/mongodb/docs into DOCS-576-production
Conflicts: conf.py makefile source/use-cases/storing-log-data.txt
2 parents e0304d0 + 8ac4f53 commit bcd9116

File tree

85 files changed

+1370
-582
lines changed

Some content is hidden

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

85 files changed

+1370
-582
lines changed

bin/makefile.compatibility

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Fixing `sed` for OS X
2+
UNAME := $(shell uname)
3+
4+
ifeq ($(UNAME), Linux)
5+
SED_ARGS_FILE = -i -r
6+
SED_ARGS_REGEX = -r
7+
endif
8+
9+
ifeq ($(UNAME), Darwin)
10+
SED_ARGS_FILE = -i "" -E
11+
SED_ARGS_REGEX = -E
12+
endif
13+
14+
ifeq ($(shell test -f /etc/arch-release && echo arch || echo Linux),arch)
15+
PYTHONBIN = python2
16+
else
17+
PYTHONBIN = python
18+
endif

makefile

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ MAKEFLAGS += -j
33
MAKEFLAGS += -r
44
MAKEFLAGS += --no-print-directory
55

6+
# includes
7+
include bin/makefile.compatibility
8+
69
# Build directory tweaking.
710
output = build
811
public-output = $(output)/public
@@ -15,31 +18,21 @@ manual-branch = master
1518
current-branch := $(shell git symbolic-ref HEAD 2>/dev/null | cut -d "/" -f "3" )
1619
last-commit := $(shell git rev-parse --verify HEAD)
1720

21+
timestamp := $(shell date +%Y%m%d%H%M)
22+
1823
ifeq ($(current-branch),$(manual-branch))
1924
current-if-not-manual = $(manual-branch)
2025
else
2126
current-if-not-manual = $(current-branch)
2227
endif
2328

24-
# Fixing `sed` for OS X
25-
UNAME := $(shell uname)
26-
ifeq ($(UNAME), Linux)
27-
SED_ARGS_FILE = -i -r
28-
SED_ARGS_REGEX = -r
29-
endif
30-
ifeq ($(UNAME), Darwin)
31-
SED_ARGS_FILE = -i "" -E
32-
SED_ARGS_REGEX = -E
33-
endif
34-
3529
# Sphinx variables.
3630
SPHINXOPTS = -c ./
3731
SPHINXBUILD = sphinx-build
3832

3933
ifdef NITPICK
4034
timestamp := $(shell date +%Y%m%d%H%M)
41-
SPHINXOPTS += -n
42-
SPHINXOPTS += -w $(branch-output)/build.$(timestamp).log
35+
SPHINXOPTS += -n -w $(branch-output)/build.$(timestamp).log
4336
endif
4437

4538
PAPER = letter
@@ -299,12 +292,6 @@ epub:
299292
#
300293
######################################################################
301294

302-
ifeq ($(shell test -f /etc/arch-release && echo arch || echo Linux),arch)
303-
PYTHONBIN = python2
304-
else
305-
PYTHONBIN = python
306-
endif
307-
308295
$(branch-output)/sitemap.xml.gz:$(branch-output)/dirhtml
309296

310297
SITEMAPBUILD = $(PYTHONBIN) bin/sitemap_gen.py
@@ -444,8 +431,7 @@ PDFLATEXCOMMAND = TEXINPUTS=".:$(branch-output)/latex/:" pdflatex --interaction
444431
#
445432
##########################################################################
446433

447-
ARCHIVE_DATE := $(shell date +%s)
448-
archive:$(public-output).$(ARCHIVE_DATE).tar.gz
434+
archive:$(public-output).$(timestamp).tar.gz
449435
@echo [archive]: created $< archive.
450436
$(public-output).$(ARCHIVE_DATE).tar.gz:$(public-output)
451437
tar -czvf $@ $<

source/administration/backups.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ With ":option:`--oplog <mongodump --oplog>`" , :program:`mongodump`
447447
copies all the data from the source database, as well as all of the
448448
:term:`oplog` entries from the beginning of the backup procedure to
449449
until the backup procedure completes. This backup procedure, in
450-
conjunction with :option:`mongorestore --oplogReplay`, allows you to
450+
conjunction with :option:`mongorestore --oplogReplay <mongorestore --oplogReplay>`, allows you to
451451
restore a backup that reflects a consistent and specific moment in
452452
time.
453453

@@ -491,7 +491,7 @@ the ``dump-2011-10-25`` directory to the :program:`mongod` instance
491491
running on the localhost interface. By default, :program:`mongorestore`
492492
will look for a database dump in the ``dump/`` directory and restore
493493
that. If you wish to restore to a non-default host, the
494-
":option:`--host <mongod>`" and ":option:`--port <mongod --port>`"
494+
":option:`--host <mongorestore --host>`" and ":option:`--port <mongorestore --port>`"
495495
options allow you to specify a non-local host to connect to capture
496496
the dump. Consider the following example:
497497

@@ -504,8 +504,9 @@ username and password credentials as above.
504504

505505
If you created your database dump using the :option:`--oplog
506506
<mongodump --oplog>` option to ensure a point-in-time snapshot, call
507-
:program:`mongorestore` with the ":option:`--oplogReplay <mongorestore
508-
--oplogReplay>`" option as in the following example:
507+
:program:`mongorestore` with the
508+
:option:`--oplogReplay <mongorestore --oplogReplay>`
509+
option as in the following example:
509510

510511
.. code-block:: sh
511512

source/administration/configuration.txt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,7 @@ following:
114114

115115
.. code-block:: cfg
116116

117-
bind_ip = 127.0.0.1
118-
bind_ip = 10.8.0.10
119-
bind_ip = 192.168.4.24
117+
bind_ip = 127.0.0.1,10.8.0.10,192.168.4.24
120118
nounixsocket = true
121119
auth = true
122120

@@ -342,7 +340,7 @@ needed:
342340
Each additional level ``v`` adds additional verbosity to the
343341
logging. The ``verbose`` option is equal to ``v = true``.
344342

345-
- :setting:`diaglog` enables diagnostic logging. Level ``3``
343+
- :setting:`diaglog` enables :term:`diagnostic logging <diagnostic log>`. Level ``3``
346344
logs all read and write options.
347345

348346
- :setting:`objcheck` forces :program:`mongod` to validate all
@@ -352,7 +350,7 @@ needed:
352350
performance.
353351

354352
- :setting:`cpu` forces :program:`mongod` to report the percentage of
355-
the last interval spent in :term:`write-lock`. The interval is
356-
typically 4 seconds, and each output line in the log includes both
357-
the actual interval since the last report and the percentage of
358-
time spent in write lock.
353+
the last interval spent in :term:`write-lock`. The interval is
354+
typically 4 seconds, and each output line in the log includes both
355+
the actual interval since the last report and the percentage of
356+
time spent in write lock.

source/administration/import-export.txt

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ with the database itself.
3838
":wiki:`MongoDB Extended JSON <Mongo+Extended+JSON>`" wiki page for
3939
more information about Use with care.
4040

41+
.. seealso:: See the ":doc:`/administration/backups`" document for
42+
more information on backing up MongoDB instances. Additionally,
43+
consider the following references for commands addressed in this
44+
document:
45+
46+
- :doc:`/reference/mongoexport`
47+
- :doc:`/reference/mongorestore`
48+
4149
.. _bson-json-type-conversion-fidelity:
4250

4351
Data Type Fidelity
@@ -117,12 +125,12 @@ JSON.
117125

118126
.. seealso:: ":wiki:`MongoDB Extended JSON <Mongo+Extended+JSON>`" wiki page.
119127

120-
Using Database Imports and Exports for Backups
121-
----------------------------------------------
128+
Data Import and Export and Backups Operations
129+
---------------------------------------------
122130

123-
For resilient and non-disruptive backups in most cases you'll want to
131+
For resilient and non-disruptive backups,
124132
use a file system or block-level disk snapshot function, such as the
125-
method described in the ":doc:`/administration/backups`" document. The
133+
methods described in the ":doc:`/administration/backups`" document. The
126134
tools and operations discussed provide functionality that's useful in
127135
the context of providing some kinds of backups.
128136

@@ -169,8 +177,8 @@ portion thereof, to a file in a :term:`JSON` or :term:`CSV` format.
169177
These tools may also be useful for importing data into a MongoDB database
170178
from third party applications.
171179

172-
Database Export with :program:`mongoexport`
173-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
180+
Collection Export with :program:`mongoexport`
181+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
174182

175183
With the :program:`mongoexport` utility you can create a backup
176184
file. In the most simple invocation, the command takes the following
@@ -200,10 +208,11 @@ that it does not interact with your shell environment. The resulting
200208
documents will return on standard output.
201209

202210
By default, :program:`mongoexport` returns one :term:`JSON document`
203-
per MongoDB document. Specify the ":option:`--jsonArray <mongoexport
204-
--jsonArrray>`" argument to return the export as a single :term:`JSON`
205-
array. Use the ":option:`--csv <mongoexport --csv>`" file to return
206-
the result in CSV (comma separated values) format.
211+
per MongoDB document. Specify the
212+
":option:`--jsonArray <mongoexport --jsonArray>`" argument to return
213+
the export as a single :term:`JSON` array. Use the ":option:`--csv
214+
<mongoexport --csv>`" file to return the result in CSV (comma
215+
separated values) format.
207216

208217
If your :program:`mongod` instance is not running, you can use the
209218
":option:`--dbpath <mongoexport --dbpath>`" option to specify the
@@ -230,8 +239,8 @@ to connect to capture the export. Consider the following example:
230239
On any :program:`mongoexport` command you may, as above specify username and
231240
password credentials as above.
232241

233-
Database Import with :program:`mongoimport`
234-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
242+
Collection Import with :program:`mongoimport`
243+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
235244

236245
To restore a backup taken with :program:`mongoexport`. Most of the
237246
arguments to :program:`mongoexport` also exist for
@@ -267,11 +276,3 @@ Use the ":option:`--ignoreBlanks <mongoimport --ignoreBlanks>`" option
267276
to ignore blank fields. For :term:`CSV` and :term:`TSV` imports, this
268277
option provides the desired functionality in most cases: it avoids
269278
inserting blank fields in MongoDB documents.
270-
271-
.. seealso:: See the ":doc:`/administration/backups`" document for
272-
more in depth information about backing up MongoDB
273-
instances. Additionally, consider the following references for
274-
commands addressed in this document:
275-
276-
- :doc:`/reference/mongoexport`
277-
- :doc:`/reference/mongorestore`

source/administration/indexes.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Create an Index
2222
~~~~~~~~~~~~~~~
2323

2424
To create an index, use :method:`db.collection.ensureIndex()` or a similar
25-
:api:`method your driver <>`. For example
25+
:api:`method from your driver <>`. For example
2626
the following creates [#ensure]_ an index on the ``phone-number`` field
2727
of the ``people`` collection:
2828

@@ -383,4 +383,4 @@ operation is an index build. The ``msg`` field also indicates the
383383
percent of the build that is complete.
384384

385385
If you need to terminate an ongoing index build, You can use the
386-
:method:`db.killOP()` method in the :program:`mongo` shell.
386+
:method:`db.killOp()` method in the :program:`mongo` shell.

0 commit comments

Comments
 (0)