1.0.13 • Published 6 years ago

dump-and-restore-db v1.0.13

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Dump-and-restore-db

Current Implementation only works via env file and default mongo port

these are required for the script to run and a zip of the database in the root

example of zip database name

7_15_2017_1502825122_databaseName.zip

Make sure your env var has a mongo url

MONGO_URI=mongodb://localhost/databaseName

Getting Started

npm install

example of restore.js settings with dump and database deletion enabled the default config is set to fault to prevent any kind unwanted of database and dump deletion

let dumpAndRestore = require('dump-and-restore-db');

var config = {
    safeMode:false,
    deleteDump:false,
    deleteDatabase:false,
};

let dumpp = new dumpAndRestore(config).init();

Currently have this implemented as an npm script inside package.json

npm run restore
1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago