Simple Node.js library to restore MongoDB dumps from BSON files created by mongodump. Version 1.0.1 is the latest stable release (no update cadence documented). Key differentiator: programmatic API for restoring dumps (full dump, single database, or single collection) with optional collection cleaning before insertion. Compared to mongorestore CLI, this lib offers fine-grained control within Node.js scripts. Minor downloads and single maintainer.
npm install mongodb-restore-dumpNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates restoring full dump, single database, and single collection from BSON files with optional clean and limit.
Set clean: false if you want to append documents instead of replacing.
No fix provided by maintainer; consider migrating to mongodb driver v4+ and adapt code.
Always provide either 'uri' or 'con'.
Use absolute paths or ensure relative paths are correct relative to process.cwd().
Use const restore = require('mongodb-restore-dump') or dynamic import with .default.Include credentials in URI: mongodb://user:pass@host:port/db
Verify the dump directory structure; ensure the path points to the directory (for database) or .bson file (for collection).