A Grunt and Gulp compatible plugin for importing and exporting MongoDB data via child process spawning of mongodump, mongorestore, mongoimport, and mongoexport. Version 0.3.5 is the latest stable release. It wraps MongoDB command-line tools into task runners, allowing configuration of dump, restore, import, and export operations. Key differentiators: supports both Grunt and Gulp, and allows separate options for dump and restore. Does not support Windows, requires MongoDB tools installed.
npm install mongobackupNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates using mongobackup with Gulp to dump and restore MongoDB databases.
Install MongoDB Database Tools from mongodb.com.
Use on Linux or macOS, or find a cross-platform alternative.
Set boolean options to true for flags, not to empty string.
Install MongoDB Database Tools and ensure they are accessible from command line.
Use const mongobackup = require('mongobackup');Run chmod +x on the tool binaries, e.g., chmod +x /usr/bin/mongodump.