diff --git a/source/administration/backups.txt b/source/administration/backups.txt index 045813b8ce6..f6317fa99bd 100644 --- a/source/administration/backups.txt +++ b/source/administration/backups.txt @@ -426,6 +426,8 @@ the local database instance (e.g. ``127.0.0.1`` or ``localhost``) and create a database backup in a in the current directory named ``dump/``. +.. include:: /includes/note-mongodump-compatibility-2.2.rst + You can specify database and collection as options to the :program:`mongodump` command to limit the amount of data included in the database dump. For example: diff --git a/source/includes/note-mongodump-compatibility-2.2.rst b/source/includes/note-mongodump-compatibility-2.2.rst new file mode 100644 index 00000000000..d2d3bce3a0d --- /dev/null +++ b/source/includes/note-mongodump-compatibility-2.2.rst @@ -0,0 +1,5 @@ +.. note:: + + If you use the :program:`mongodump` tool from the 2.2 distribution to + create a dump of a database, you can restore that dump only to a 2.2 + database. diff --git a/source/reference/mongodump.txt b/source/reference/mongodump.txt index f49bb4a338a..a549cc085ae 100644 --- a/source/reference/mongodump.txt +++ b/source/reference/mongodump.txt @@ -15,6 +15,8 @@ effective :doc:`backup strategy `. Use in conjunction with :program:`mongorestore` to provide restore functionality. +.. include:: /includes/note-mongodump-compatibility-2.2.rst + .. seealso:: ":program:`mongorestore`" and ":doc:`/administration/backups`". Options diff --git a/source/reference/mongorestore.txt b/source/reference/mongorestore.txt index c0ec6150d0e..f5a7eabce66 100644 --- a/source/reference/mongorestore.txt +++ b/source/reference/mongorestore.txt @@ -9,9 +9,21 @@ Synopsis -------- -The :program:`mongorestore` utility provides the ability to import content -from binary database dump into a specific database. This is the -inverse functionality of :program:`mongodump`. +The :program:`mongorestore` tool imports content from binary database +dump into a specific database. :program:`mongorestore` can import +content to an existing database or create a new one. + +Specifically, :program:`mongorestore` takes the output from +:program:`mongodump` and restores it. :program:`mongorestore` creates +indexes on a restore. :program:`mongorestore` performs only inserts. If +existing data with the same ``_id`` already exists on the database, +:program:`mongorestore` will not replace it. + +The :program:`mongorestore` tool does "fire-n-forget" inserts and does +not perform safe writes. Any errors that might happen during inserts are +recorded only on the server logs and not reported in the tool. + +.. include:: /includes/note-mongodump-compatibility-2.2.rst Options ------- @@ -32,7 +44,7 @@ Options .. option:: --version - Returns the version of the :program:`mongorestore` utility. + Returns the version of the :program:`mongorestore` tool. .. option:: --host <:port> diff --git a/source/release-notes/2.2.txt b/source/release-notes/2.2.txt index c667840fb5d..6fbd3ba2572 100644 --- a/source/release-notes/2.2.txt +++ b/source/release-notes/2.2.txt @@ -254,7 +254,16 @@ running as upserts will only output a ``null`` value. Previously, in version 2.0 these operations would return an empty document, e.g. ``{ }``. -See: :issue:`SERVER-6226`. +See: :issue:`SERVER-6226` for more information. + +``mongodump`` Can Restore Only to a 2.2 Database +```````````````````````````````````````````````` + +If you use the :program:`mongodump` tool from the 2.2 distribution to +create a dump of a database, you may only restore that dump to a 2.2 +database. + +See: :issue:`SERVER-6961` for more information. Behavioral Changes ~~~~~~~~~~~~~~~~~~