-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: mongodump
-
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:
- some sort of checksum of the bson data file (to rule out later corruption of the data file during transfer, bad media etc)
- the total number of documents in the collection
- 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.