Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-3641

dump and restore collection metadata as BSON

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      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".

            Assignee:
            Unassigned Unassigned
            Reporter:
            jian.guan@mongodb.com Jian Guan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: