couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Duncan Scott <dnsc...@gmail.com>
Subject command line interface to manage CouchDB replication
Date Wed, 05 Feb 2014 02:55:19 GMT
I needed a command line tool to manage CouchDB replication.  A quick survey
of existing tools at the CouchDB site and on github didn't turn up anything
specific to my needs.

So I rolled my own light utility:
https://github.com/duncanscott/couch-cli


$ couch-cli replicate production --all --target backup --continuous
skipping _replicator
skipping _users
9878f9de1b814649503331e3b8027825 started continuous pull replication of
geneusprod.ws_logger to backup.ws_logger
9878f9de1b814649503331e3b8029c45 started continuous pull replication of
geneusprod.samples-submission to backup.samples-submission


It's also possible to create backups with a prefix generated by the tool:

$ couch-cli backup production --all --target backup --tag weekly
skipping _replicator
skipping _users
9878f9de1b814649503331e3b802dff5 started pull replication of
geneusprod.ws_logger to
backup.backup_geneusprod_20140204182434419_weekly_ws_logger
9878f9de1b814649503331e3b8031013 started pull replication of
geneusprod.samples-submission to
backup.backup_geneusprod_20140204182434562_weekly_samples-submission


And then to delete backups with specific tags and/or older than a given
number of days.

$ couch-cli deleteBackups backup --tag weekly --olderThan 30


Thought it might be of use.

You can build the executable using gradle or download an executable from
github.  Java is needed to run the executable.
https://github.com/duncanscott/couch-cli/release<https://github.com/duncanscott/couch-cli/releases/tag/v2.0>


Thanks, Duncan



P.S.

Taking another look at http://wiki.apache.org/couchdb/CouchDB_tools, it
looks like my application has some functionality similar to that of a new
project (which didn't exist when I wrote mine).

https://github.com/awilliams/couchdb-utils

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message