mongodb-timemachine

0.0.1 • Public • Published

mongodb-timemachine

Backup and restore mongodb database for your local development. This package takes the backup of the database with a timestamp and then allows you to restore to latest/previous version as needed for development.

oclif Version Downloads/week License

Usage

// Installation
$ npm install -g mongodb-timemachine

// Initialise the timemachine and stores the connection configuration
// Only to be executed once
$ mongodb-timemachine init -uri=mongodb://localhost:27017/local

// Takes the current snapshot from the database
$ mongodb-timemachine snapshot

// Restores the latest snapshot to the database
$ mongodb-timemachine restore

// List all the snapshots
$ mongodb-timemachine ls

// Flush all the snapshot taken so far (except for the latest one)
$ mongodb-timemachine flus

Todo

  • [ ] Name based snapshot
  • [ ] Support multiple database (Currently only single database is supported)

Readme

Keywords

Package Sidebar

Install

npm i mongodb-timemachine

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

13.4 kB

Total Files

12

Last publish

Collaborators

  • sandeepjain88