Decode one collection’s BSON file
Use bsondump from MongoDB Database Tools to convert a collection’s .bson file. The path below matches the fixture in the dump and export walkthrough. If your dump is an archive, use the archive restore workflow in MongoDB Database Tools.
bsondump --outFile=./decoded-orders.jsonl ./practice-dump/keplergrid_transfer/orders.bson
For the practice order, the JSON line includes $oid for _id and $numberDecimal for total. Treat the resulting file as sensitive if the original contained real data.
Import into an empty practice collection
Create keplergrid_bson.orders on your practice instance. In KeplerGrid, right-click the destination, choose Import documents…, select decoded-orders.jsonl, and review the import before starting. Then open the document and inspect its fields.
For this fixture the import adds one row. Collection indexes and other dump metadata travel through the backup and restore workflow described above.
Verify the imported BSON types
In mongosh, verify that the imported identifier, date and total kept their types.
const orders = db.getSiblingDB("keplergrid_bson").orders;
orders.aggregate([
{ $project: {
_id: 0,
idType: { $type: "$_id" },
dateType: { $type: "$orderedAt" },
totalType: { $type: "$total" }
} }
]).toArray();
Expected values are objectId, date and decimal.
Preserve BSON types when exporting · Import a JSON Lines file · MongoDB bsondump reference