Cloudant and CouchDB Replication with couchreplicate

A new command-line tool for managing and monitoring multiple replication jobs

Glynn Bird
Feb 22, 2018 · 3 min read
Configuring a replication job in the Cloudant dashboard.

Installing couchreplicate

$ npm install -g couchreplicate
$ couchreplicate --help

Replicating a single database

$ couchreplicate -s http://u:p@localhost:5984/mysource -t https://U:P@HOST.cloudant.com/mytarget
food [▇▇▇▇▇▇▇▇———————————————————————————] 32% 21.1s triggered
$ couchreplicate -d food -s http://u:p@localhost:5984 -t https://U:P@HOST.cloudant.com

Replicating multiple databases

$ couchreplicate -d food,drink,hardware,software -s http://u:p@localhost:5984 -t https://U:P@HOST.cloudant.com
food  [▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇]100% 42.5s completed
drink [▇▇▇▇▇▇▇▇———————————————————————————] 32% 21.1s triggered
$ couchreplicate -c 3 -d food,drink,hardware,software -s http://u:p@localhost:5984 -t https://U:P@HOST.cloudant.com
food     [▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇—————] 82% 34.5s triggered
drink    [▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇———————————————] 63% 34.1s triggered
hardware [▇▇—————————————————————————————————————] 10% 34.1s triggered

Replicating all of your databases

$ couchreplicate -c 3 -a -s http://u:p@localhost:5984 -t https://U:P@HOST.cloudant.com

It’s all about the open source

Further reading


IBM CODAIT

Things we made with data at IBM’s Center for Open Source Data and AI Technologies.

Glynn Bird

Written by

Developer @ IBM. https://glynnbird.com

IBM CODAIT

Things we made with data at IBM’s Center for Open Source Data and AI Technologies.