File tree Expand file tree Collapse file tree 5 files changed +32
-19
lines changed Expand file tree Collapse file tree 5 files changed +32
-19
lines changed Original file line number Diff line number Diff line change @@ -426,6 +426,8 @@ the local database instance (e.g. ``127.0.0.1`` or ``localhost``) and
426426create a database backup in a in the current directory named
427427``dump/``.
428428
429+ .. include:: /includes/note-mongodump-compatibility-2.2.rst
430+
429431You can specify database and collection as options to the
430432:program:`mongodump` command to limit the amount of data included in the
431433database dump. For example:
Original file line number Diff line number Diff line change 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.
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ effective :doc:`backup strategy </administration/backups>`. Use in
1515conjunction with :program:`mongorestore` to provide restore
1616functionality.
1717
18+ .. include:: /includes/note-mongodump-compatibility-2.2.rst
19+
1820.. seealso:: ":program:`mongorestore`" and ":doc:`/administration/backups`".
1921
2022Options
Original file line number Diff line number Diff line change 99Synopsis
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
1628Options
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
Original file line number Diff line number Diff line change @@ -254,24 +254,16 @@ running as upserts will only output a ``null`` value.
254254Previously, in version 2.0 these operations would return an empty
255255document, 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
276268Behavioral Changes
277269~~~~~~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments