Skip to content
forked from vot/dbclone

Utility to move data between NoSQL databases (very early stage of development)

License

Notifications You must be signed in to change notification settings

YuechengWu/dbclone

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dbclone

NPM Version NPM Downloads MIT License

Utility to move data between NoSQL databases.

Features

  • Import/export MongoDB databases
  • Automatic selection of all collections
  • Include/exclude collections for partial imports and exports

Usage in terminal

You can use dbclone command in your terminal if you install the package globally (npm install dbclone -g).

CLI OPTIONS

Two modes are supported: import and export.

They both need MongoDB host and database name).

You can also specify the data directory for more flexibility.

Usage in Node.js apps

TBD. See example.js for a quick demo.

TODO

  • support db dropping, counting documents and diffing two databases
  • store data types
  • add support for indexed properties
  • add backends for other database types
  • destructive/clean mode (drop db before import to force clean state)
  • force mode (in non-destructive mode) to override existing documents / controlled upsert
  • cleaner interfaces in libs
  • documentation

Release notes

v0.0.2

  • Maintenance: changed license from deprecated LGPL-3.0 to MIT
  • Bugfix: preserving correct types (fixes problem with ObjectIDs imported as strings)
  • Bugfix: fixed include/exclude parsing
  • Feature: added count method (thanks @thiagormagalhaes)

v0.0.1

  • basic import and export functionality

About

Utility to move data between NoSQL databases (very early stage of development)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%