Coder Social home page Coder Social logo

replicate-couchdb's Introduction

replicate-couchdb

Replicate CouchDB using the PouchDB library.

Getting Started

After cloning the project, execute the command below to download all needed libraries:

 $ npm install

Now you can start replicating a CouchDB (source) to another instance of CouchDB (target).

 $ npm start <source url> <target url>

or you can also execute the following commands:

 $ npm run build
 $ node dist/replicate-couchdb.js <source url> <target url>

In each case, if the arguments are wrong, a screen will show how to execute the replication correctly:

replicate-couchdb.js 

Commands:
  replicate-couchdb.js    Replicate the source CouchDB to the target

Options:
  --version  Show version number                                                                                                   [boolean]
  --help     Show help                                                                                                             [boolean]

Examples:
  replicate-couchdb.js http://192.168.172.100:5984/mydatabase   http://user:password@localhost:5984/mydatabase

Cleaning before new replication

The replicate-couchdb creates temporarily a local database in the folder ./tempdb. Before starting a new replication, certify to clean everything running the command below:

 $ npm run clean-all

This command removes the folder ./tempdb. Otherwise, the existing content will be also replicated to the target CouchDB.

Replication Only

After replicating once, you can replicate the temporarily local database to another CouchDB instances. For this, you have to run teh command below:

 $ npm run build
 $ node dist/replicate-only-couchdb.js <target url>

replicate-couchdb's People

Contributors

jocafi avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.