1.6.2 • Published 7 years ago
mongodb-restore v1.6.2
mongodb-restore
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 todrop
option), or selected collections if Array (default "false")[options]
- Object MongoDb options (default)
Examples
Take a look at my examples
License Apache2
1.6.2
7 years ago
1.6.1
7 years ago
1.6.0
8 years ago
1.5.6
8 years ago
1.5.5
8 years ago
1.5.4
8 years ago
1.4.6
8 years ago
1.5.3
8 years ago
1.5.2
8 years ago
1.4.5
8 years ago
1.4.4
8 years ago
1.5.1
8 years ago
1.5.0
8 years ago
1.4.3
8 years ago
1.4.2
9 years ago
1.4.1
9 years ago
1.4.0
9 years ago
1.3.0
9 years ago
1.2.2
9 years ago
1.2.1
9 years ago
1.2.0
9 years ago
1.1.1
9 years ago
1.1.0
9 years ago
1.0.2
9 years ago
1.0.1
9 years ago
1.0.0
9 years ago
0.1.0
9 years ago
0.0.2
9 years ago
0.0.1
9 years ago