-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
5
-
Tools and Replicator
-
145
-
Needed
-
Mongodump and mongorestore are exposed to a fundamental limitation of extended JSON.
If a collection's options contain a BSON Object with a $-prefixed field, and the field's name is the same as a string used as a type indicator in extended JSON format, such as $date and $numberLong, mongodump could cause:
a) a dump file that results in a different collection from the original collection after being restored, or
b) a dump file that is unrestorable by mongorestore
The solution for this issue is to dump and restore collection metadata as BSON. This would be the default behavior for dump and restore, and applies to the --archive option. It will deprecate the current behavior that uses ext JSON.
The current archive format version is "0.1". Since this will change the archive format, if mongodump creates an archive file that contains collection metadata as BSON, it should produce an updated archive format version "0.2".
- related to
-
TOOLS-3637 Mongodump should check collection metadata consistency
- Accepted