Registry / database / mongodb-restore-cli

mongodb-restore-cli

JSON →
library0.5.0jsnpmunverified

A CLI tool for restoring MongoDB backups, built on top of the mongodb-restore library. Version 0.5.0 is the latest stable release. It supports restoring from BSON/JSON, options for dropping collections before restore, metadata (indexes etc.) restoration, and extraction from tar files. Similar to the official mongorestore but published as an npm package. The project appears to be a personal utility with infrequent updates. Release cadence is unknown; last publish likely years ago.

npm install mongodb-restore-cli
INSTALL
IMPORT
SIG · MONGODB-RESTORE-CL
M
mongodb-restore-cli
databasejavascriptv0.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mongodb-restore-cli
npm install -g mongodb-restore-cli
npm install mongodb-restore-cli (without -g, installed locally but used as CLI)
Install globally to use the 'mongodb-restore' command.

Installs the CLI globally and runs a restore command targeting a local MongoDB instance, dropping existing collections and reading from a backup directory.

npm install -g mongodb-restore-cli mongodb-restore --host localhost:27017 --drop --out /path/to/backup
Debug
Known issues
gotchaThis package is not actively maintained; last update likely years ago. Not compatible with modern Mongo versions.
fix
Consider using official mongorestore tool or a maintained alternative like mongodb-backup.
affects: >=0.5.0
gotchaCLI name 'mongodb-restore' may conflict with official MongoDB tool of same name if both are in PATH.
fix
Be careful with PATH order or use fully qualified paths.
affects: all
Errors
Common errors & fixes
'mongodb-restore' is not recognized as an internal or external command
Package not installed globally or not in PATH.
fix
Run 'npm install -g mongodb-restore-cli' and ensure npm global bin directory is in PATH.
SyntaxError: Unexpected token import
Node version too old (<1) for ES modules if code uses import, but package supports Node >=1.
fix
Upgrade Node.js to version 12 or later.
Upgrade
Version history
0.5.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
mongodb-restore-cli — npm install mongodb-restore-cli · libregistry