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

mongodump should output a summary/checksum file allowing validation of restores

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

      As far as I'm aware, there's no good way to verify that a mongorestore of a dump is complete and accurate. Since restores can take some time, and often restoring from an old version of mongod can show up some weirdness with old index formats (or indexes with keys too long etc), it can be hard to verify that all documents were actually restored completely.

      I would like to see mongodump output an additional file for each collection at the end of dumping, which included at least:

      1. some sort of checksum of the bson data file (to rule out later corruption of the data file during transfer, bad media etc)
      2. the total number of documents in the collection
      3. total number of bytes that should appear in the collection.dataSize after restore

      Then mongorestore could validate the checksum before restoring each collection, and the other counts after restoring each collection was complete, and report any discrepancies. 

            Assignee:
            Unassigned Unassigned
            Reporter:
            nicholas.cottrell@mongodb.com Nic Cottrell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: