Skip to content

Commit 76b2f14

Browse files
committed
DOCS-11289: mongorestore and index key length limit
1 parent 8b95185 commit 76b2f14

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

source/reference/program/mongorestore.txt

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,10 @@
1919
Synopsis
2020
--------
2121

22-
The :binary:`~bin.mongorestore` program writes data from a binary database
23-
dump created by :binary:`~bin.mongodump` to a MongoDB instance.
24-
25-
.. versionadded:: 3.0.0 :binary:`~bin.mongorestore` also accepts data to
26-
restore via the standard input.
27-
28-
:binary:`~bin.mongorestore` can write data to either :binary:`~bin.mongod` or
29-
:binary:`~bin.mongos` instances.
22+
The :binary:`~bin.mongorestore` program loads data from either a binary
23+
database dump created by :binary:`~bin.mongodump` or the standard input
24+
(starting in version 3.0.0) into a :binary:`~bin.mongod` or
25+
:binary:`~bin.mongos` instance.
3026

3127
.. include:: /includes/extracts/require-cmd-line-mongorestore.rst
3228

@@ -52,6 +48,20 @@ Rebuild Indexes
5248
:binary:`~bin.mongorestore` recreates indexes recorded by
5349
:binary:`~bin.mongodump`.
5450

51+
.. note::
52+
53+
Starting in MongoDB 2.6, creating indexes will :ref:`error if an
54+
index key in an existing document exceeds the limit
55+
<2.6-index-key-length-incompatibility>`. See
56+
:ref:`2.6-index-key-length-incompatibility` for more information and
57+
solution.
58+
59+
If you have an existing data set that violates this limit but want
60+
to resolve the index issue after restoring the data, you can disable
61+
the default index key length validation on the target database by
62+
setting the :program:`mongod` instance's
63+
:parameter:`failIndexKeyTooLong` parameter to false.
64+
5565
Version Compatibility
5666
~~~~~~~~~~~~~~~~~~~~~
5767

0 commit comments

Comments
 (0)