Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mongodb-restore

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongodb-restore

restore data from mongodb-backup

  • 1.6.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
426
decreased by-23.66%
Maintainers
1
Weekly downloads
 
Created
Source

mongodb-restore

NPM version Linux Status Windows Status Dependency Status Coveralls

Restore data from mongodb-backup

Look at mongodb-restore-cli for command line usage, similar to mongorestore

Installation

Install through NPM

npm install mongodb-restore

or

git clone git://github.com/hex7c0/mongodb-restore.git

Bson@0.4.11 has been pulled out, so versions >= 1.3.0 and <= 1.4.1 are deprecate

API

inside nodejs project

var restore = require('mongodb-restore');

restore({
  uri: 'uri', // mongodb://<dbuser>:<dbpassword>@<dbdomain>.mongolab.com:<dbport>/<dbdatabase>
  root: __dirname + '/dbName'
});

restore(options)

options
  • uri - String URI for MongoDb connection (default "required")
  • root- String Path where get the backup (default "required")
  • [parser] - String | Function Data parser (bson, json) or custom (default "bson")
  • [callback] - Function Callback when done (default "disabled")
  • [stream]- Object Get .tar file from Node stream (default "disabled")
  • [tar] - String Extract files from a .tar file (default "disabled")
  • [logger] - String Path where save a .log file (default "disabled")
  • [metadata] - Boolean Set metadata of collections as Index, ecc (default "false")
  • [drop] - Boolean Drop every collection from the target database before restoring the collection (default "false")
  • [dropCollections] - Boolean|Array Drop every collection from the target database before restoring if Boolean (similar to drop option), or selected collections if Array (default "false")
  • [options] - Object MongoDb options (default)

Examples

Take a look at my examples

License Apache2

Keywords

FAQs

Package last updated on 13 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc