Skip to content

Commit 7adf8eb

Browse files
schmallisokay-kim
authored andcommitted
correction to address TOOLS-1035 changes
1 parent ec35789 commit 7adf8eb

File tree

2 files changed

+46
-49
lines changed

2 files changed

+46
-49
lines changed

source/includes/options-mongorestore.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,11 +447,7 @@ description: |
447447
.. versionadded:: 3.2
448448
449449
Restores from compressed files or data stream created by
450-
<<<<<<< HEAD
451-
:binary:`mongodump --archive <bin.mongodump>`
452-
=======
453450
:binary:`~bin.mongodump --archive <mongodump>`
454-
>>>>>>> DOCSP-980: clarify oplogReplay behaviour for 3.4
455451
456452
To restore from a dump directory that contains compressed files, run
457453
:binary:`~bin.mongorestore` with the new ``--gzip`` option.

source/reference/program/mongorestore.txt

Lines changed: 46 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,11 @@ Version Compatibility
6767

6868
.. include:: /includes/warning-mongodump-compatibility-2.2.rst
6969

70-
.. COMMENT upon completion of TOOLS-1035, either delete the whole section or delete everything after the semicolon.
71-
7270
Exclude ``system.profile`` Collection
7371
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7472

7573
:binary:`~bin.mongorestore` does not restore the :data:`system.profile
76-
<<database>.system.profile>` collection data; however, if the backup
77-
data includes :data:`system.profile <<database>.system.profile>`
78-
collection data and the collection does not exist in the target
79-
database, :binary:`~bin.mongorestore` creates the collection but does not
80-
insert any data into the collection.
74+
<<database>.system.profile>` collection data.
8175

8276
.. _mongorestore-required-access:
8377

@@ -213,13 +207,14 @@ running on the localhost interface on port ``27017``.
213207

214208
.. versionadded:: 3.4
215209

216-
You may alternatively use :option:`--nsInclude <mongorestore --nsInclude>` to specify the
217-
canonical name of the collection that you wish to restore rather than
218-
:option:`--collection <mongorestore --collection>`. :option:`--nsInclude <mongorestore --nsInclude>` enables you to specify
219-
the :term:`namespace` of one or more collections that you
220-
wish to include in the restore operation. The following example
221-
restores the ``people`` collection from the ``accounts`` database
222-
in the ``dump/`` sub-directory of the current directory:
210+
You may alternatively use :option:`--nsInclude <mongorestore
211+
--nsInclude>` to specify the canonical name of the collection that you
212+
wish to restore rather than :option:`--collection <mongorestore
213+
--collection>`. :option:`--nsInclude <mongorestore --nsInclude>`
214+
enables you to specify the :term:`namespace` of one or more collections
215+
that you wish to include in the restore operation. The following
216+
example restores the ``people`` collection from the ``accounts``
217+
database in the ``dump/`` sub-directory of the current directory:
223218

224219
.. code-block:: sh
225220

@@ -232,18 +227,20 @@ Restore Collections Using Wild Cards
232227

233228
.. versionadded:: 3.4
234229

235-
:option:`--nsInclude <mongorestore --nsInclude>` and :option:`--nsExclude <mongorestore --nsExclude>` support specifying
236-
the :term:`namespaces <namespace>` you wish to include or exclude from a restore operation
237-
using asterisks as *wild cards*.
230+
:option:`--nsInclude <mongorestore --nsInclude>` and
231+
:option:`--nsExclude <mongorestore --nsExclude>` support specifying the
232+
:term:`namespaces <namespace>` you wish to include or exclude from a
233+
restore operation using asterisks as *wild cards*.
238234

239235
The following example restores the documents in the ``dump/``
240236
sub-directory of the current directory that match the specified
241-
namespace pattern. The :option:`--nsInclude <mongorestore --nsInclude>` statement specifies to
242-
only restore documents in the ``transactions`` database while
243-
:option:`--nsExclude <mongorestore --nsExclude>` instructs :binary:`~bin.mongorestore` to exclude
244-
collections whose names end with ``_dev``. :binary:`~bin.mongorestore`
245-
restores data to the :binary:`~bin.mongod` instance running on the
246-
localhost interface on port ``27017``.
237+
namespace pattern. The :option:`--nsInclude <mongorestore --nsInclude>`
238+
statement specifies to only restore documents in the ``transactions``
239+
database while :option:`--nsExclude <mongorestore --nsExclude>`
240+
instructs :binary:`~bin.mongorestore` to exclude collections whose
241+
names end with ``_dev``. :binary:`~bin.mongorestore` restores data to
242+
the :binary:`~bin.mongod` instance running on the localhost interface
243+
on port ``27017``.
247244

248245
.. code-block:: sh
249246

@@ -256,15 +253,17 @@ Change Collections' Namespaces during Restore
256253

257254
.. versionadded:: 3.4
258255

259-
MongoDB 3.4 added the :option:`--nsFrom <mongorestore --nsFrom>` and :option:`--nsTo <mongorestore --nsTo>` options,
260-
which enable you to change the namespace of a collection that you are
261-
restoring. :option:`--nsFrom <mongorestore --nsFrom>` and :option:`--nsTo <mongorestore --nsTo>` support using
262-
asterisks as wild cards *and* support using dollar signs to delimit
263-
"wild card" variables to use in the replacement.
256+
MongoDB 3.4 added the :option:`--nsFrom <mongorestore --nsFrom>` and
257+
:option:`--nsTo <mongorestore --nsTo>` options, which enable you to
258+
change the namespace of a collection that you are restoring.
259+
:option:`--nsFrom <mongorestore --nsFrom>` and :option:`--nsTo
260+
<mongorestore --nsTo>` support using asterisks as wild cards *and*
261+
support using dollar signs to delimit "wild card" variables to use in
262+
the replacement.
264263

265264
Consider a database ``data`` that you have exported to a ``dump/``
266-
directory using :binary:`~bin.mongodump`. The ``data`` database contains the following
267-
collections:
265+
directory using :binary:`~bin.mongodump`. The ``data`` database
266+
contains the following collections:
268267

269268
- ``sales_customer1``
270269
- ``sales_customer2``
@@ -273,11 +272,13 @@ collections:
273272
- ``users_customer2``
274273
- ``users_customer3``
275274

276-
Using :option:`--nsFrom <mongorestore --nsFrom>` and :option:`--nsTo <mongorestore --nsTo>`, you can restore the data
277-
into different namespaces. The following operation
275+
Using :option:`--nsFrom <mongorestore --nsFrom>` and :option:`--nsTo
276+
<mongorestore --nsTo>`, you can restore the data into different
277+
namespaces. The following operation
278278

279-
- restores the ``sales_<customerName>`` collections in the ``data`` database to
280-
``sales`` collections in the ``<customerName>`` database, and
279+
- restores the ``sales_<customerName>`` collections in the ``data``
280+
database to ``sales`` collections in the ``<customerName>`` database,
281+
and
281282

282283
- restores the ``users_<customerName>`` collections to ``users``
283284
collections in the ``<customerName>`` database.
@@ -289,12 +290,12 @@ into different namespaces. The following operation
289290
Restore with Access Control
290291
~~~~~~~~~~~~~~~~~~~~~~~~~~~
291292

292-
In the following example, :binary:`~bin.mongorestore` restores a database
293-
dump located at ``/opt/backup/mongodump-2011-10-24``, to a database
294-
running on port ``37017`` on the host
295-
``mongodb1.example.net``. The :binary:`~bin.mongorestore` command authenticates to
296-
the MongoDB instance using the username ``user`` and the
297-
password ``pass``, as follows:
293+
In the following example, :binary:`~bin.mongorestore` restores a
294+
database dump located at ``/opt/backup/mongodump-2011-10-24``, to a
295+
database running on port ``37017`` on the host
296+
``mongodb1.example.net``. The :binary:`~bin.mongorestore` command
297+
authenticates to the MongoDB instance using the username ``user`` and
298+
the password ``pass``, as follows:
298299

299300
.. code-block:: sh
300301

@@ -333,8 +334,8 @@ Restore a Database from Standard Input
333334

334335
.. versionadded:: 3.2
335336

336-
To restore from the standard input, run :binary:`~bin.mongorestore` with the
337-
``archive`` option but *omit* the filename. For example:
337+
To restore from the standard input, run :binary:`~bin.mongorestore`
338+
with the ``archive`` option but *omit* the filename. For example:
338339

339340
.. code-block:: sh
340341

@@ -350,9 +351,9 @@ Restore from Compressed Data
350351
compressed files or data stream created by :binary:`~bin.mongodump`.
351352

352353
To restore from a dump directory that contains compressed files, run
353-
:binary:`~bin.mongorestore` with the new ``--gzip`` option. For example, the
354-
following operation restores the ``test`` database from the compressed
355-
files located in the default ``dump`` directory:
354+
:binary:`~bin.mongorestore` with the new ``--gzip`` option. For
355+
example, the following operation restores the ``test`` database from
356+
the compressed files located in the default ``dump`` directory:
356357

357358
.. code-block:: sh
358359

0 commit comments

Comments
 (0)