Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5230410CF6 for ; Wed, 5 Feb 2014 12:28:37 +0000 (UTC) Received: (qmail 85951 invoked by uid 500); 5 Feb 2014 12:28:34 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 85524 invoked by uid 500); 5 Feb 2014 12:28:33 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 85510 invoked by uid 99); 5 Feb 2014 12:28:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Feb 2014 12:28:31 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of pwnfactory@gmail.com designates 74.125.83.46 as permitted sender) Received: from [74.125.83.46] (HELO mail-ee0-f46.google.com) (74.125.83.46) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Feb 2014 12:28:28 +0000 Received: by mail-ee0-f46.google.com with SMTP id c13so188952eek.19 for ; Wed, 05 Feb 2014 04:28:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=ZX6vasWUtfAM7Yepn0nLp47jw0pytNLTJ1qRsM38o4A=; b=KHhP/KINZrWBQPuICV1Chz+TM7mmitxXYIK7/SOWp3zoaAeP6kzqCYUiYqLXUMkGJ6 Qox+dRgnAef+7GDZk38qe41Gz/BEh4JgW5rj7GUoG0llSjq4qOOlIuiYdDqnde51rmy1 U7BJGj8Wo/qDvxspya9w2kfNFR4DjjuNLVRNJnoxe9TV4oATBE284YxEc8HDspf1ZZit mY1GZT3v4nmSEhhPOaTyyogJhloYzMAyjXoF2pBXA9D0yDPrmLtBSXrsxbOOy8HPDKa2 ZBcDi8ZGabER+aJbswuLzDpm8bcmOFRibJ3kl/lt6WruKHWjDHVf5vnHCLp1v831nDir JyAA== X-Received: by 10.14.221.201 with SMTP id r49mr104108eep.116.1391603286978; Wed, 05 Feb 2014 04:28:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.14.173.135 with HTTP; Wed, 5 Feb 2014 04:27:46 -0800 (PST) In-Reply-To: References: From: Adam Williams Date: Wed, 5 Feb 2014 13:27:46 +0100 Message-ID: Subject: Re: command line interface to manage CouchDB replication To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=047d7b66fa4396b76e04f1a7e3e1 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b66fa4396b76e04f1a7e3e1 Content-Type: text/plain; charset=UTF-8 Hello Duncan, The utility looks great. I like the use of the COUCHCLI_CONFIG file for storing host information. What is the difference between 'backup' and 'replicate'? It seems that backup adds a prefix to the databases? - Adam On Wed, Feb 5, 2014 at 10:35 AM, Andy Wenk wrote: > Hi Duncan, > > thanks a lot for the post! I think it would be cool to add the link to > https://wiki.apache.org/couchdb/CouchDB_tools even though there is already > couchdb-utils. The fact that you build something for communicating with > CouchDB is super cool so it should be mentioned! > > Thanks for your contribution > > Cheers > > Andy > > > On 5 February 2014 03:55, Duncan Scott wrote: > > > 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 > > > > > > -- > Andy Wenk > Hamburg - Germany > RockIt! > > http://www.couchdb-buch.de > http://www.pg-praxisbuch.de > > GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588 > > https://people.apache.org/keys/committer/andywenk.asc > --047d7b66fa4396b76e04f1a7e3e1--