Skip to content

Commit 8438d4b

Browse files
author
Bob Grabar
committed
SERVER-6961 DOCS-455 mongodump and mongorestore documentation
1 parent a26840f commit 8438d4b

File tree

5 files changed

+32
-19
lines changed

5 files changed

+32
-19
lines changed

source/administration/backups.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,8 @@ the local database instance (e.g. ``127.0.0.1`` or ``localhost``) and
426426
create a database backup in a in the current directory named
427427
``dump/``.
428428

429+
.. include:: /includes/note-mongodump-compatibility-2.2.rst
430+
429431
You can specify database and collection as options to the
430432
:program:`mongodump` command to limit the amount of data included in the
431433
database dump. For example:
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. note::
2+
3+
If you use the :program:`mongodump` tool from the 2.2 distribution to
4+
create a dump of a database, you can restore that dump only to a 2.2
5+
database.

source/reference/mongodump.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ effective :doc:`backup strategy </administration/backups>`. Use in
1515
conjunction with :program:`mongorestore` to provide restore
1616
functionality.
1717

18+
.. include:: /includes/note-mongodump-compatibility-2.2.rst
19+
1820
.. seealso:: ":program:`mongorestore`" and ":doc:`/administration/backups`".
1921

2022
Options

source/reference/mongorestore.txt

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,21 @@
99
Synopsis
1010
--------
1111

12-
The :program:`mongorestore` utility provides the ability to import content
13-
from binary database dump into a specific database. This is the
14-
inverse functionality of :program:`mongodump`.
12+
The :program:`mongorestore` tool imports content from binary database
13+
dump into a specific database. :program:`mongorestore` can import
14+
content to an existing database or create a new one.
15+
16+
Specifically, :program:`mongorestore` takes the output from
17+
:program:`mongodump` and restores it. :program:`mongorestore` creates
18+
indexes on a restore. :program:`mongorestore` performs only inserts. If
19+
existing data with the same ``_id`` already exists on the database,
20+
:program:`mongorestore` will not replace it.
21+
22+
The :program:`mongorestore` tool does "fire-n-forget" writes. This means
23+
that any errors that might happen during inserts are recorded only on
24+
the server logs and not reported in the tool.
25+
26+
.. include:: /includes/note-mongodump-compatibility-2.2.rst
1527

1628
Options
1729
-------
@@ -32,7 +44,7 @@ Options
3244

3345
.. option:: --version
3446

35-
Returns the version of the :program:`mongorestore` utility.
47+
Returns the version of the :program:`mongorestore` tool.
3648

3749
.. option:: --host <hostname><:port>
3850

source/release-notes/2.2.txt

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -254,24 +254,16 @@ running as upserts will only output a ``null`` value.
254254
Previously, in version 2.0 these operations would return an empty
255255
document, e.g. ``{ }``.
256256

257-
See: :issue:`SERVER-6226`.
257+
See: :issue:`SERVER-6226` for more information.
258258

259-
A Version-2.2 ``mongodump`` Cannot be Restored to a Pre-2.2 Database
260-
````````````````````````````````````````````````````````````````````
261-
262-
A :program:`mongodump` performed in version 2.2 cannot be imported to
263-
previous versions as doing so results lost indexes. If you are running
264-
an earlier-version database (for example a version-2.0 database), you
265-
cannot perform a :program:`mongorestore` on data from a version 2.2
266-
:program:`mongodump`.
259+
``mongodump`` Can Restore Only to a 2.2 Database
260+
````````````````````````````````````````````````
267261

268-
In version 2.2, :program:`mongodump` does not create a
269-
system.indexes.bson for each database. The pre-2.2
270-
:program:`mongorestore` will not retain indexes that existed in the
271-
dumped database.
262+
If you use the :program:`mongodump` tool from the 2.2 distribution to
263+
create a dump of a database, you may only restore that dump to a 2.2
264+
database.
272265

273-
.. Do we want to include a link to the ticket?
274-
.. See: :issue:`SERVER-6961`.
266+
See: :issue:`SERVER-6961` for more information.
275267

276268
Behavioral Changes
277269
~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)