Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 21174 invoked from network); 7 Aug 2010 03:06:31 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Aug 2010 03:06:31 -0000 Received: (qmail 67990 invoked by uid 500); 7 Aug 2010 03:06:30 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 67568 invoked by uid 500); 7 Aug 2010 03:06:28 -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 67551 invoked by uid 99); 7 Aug 2010 03:06:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Aug 2010 03:06:27 +0000 X-ASF-Spam-Status: No, hits=4.3 required=10.0 tests=FS_REPLICA,SPF_NEUTRAL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.214.180] (HELO mail-iw0-f180.google.com) (209.85.214.180) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Aug 2010 03:06:22 +0000 Received: by iwn4 with SMTP id 4so2694670iwn.11 for ; Fri, 06 Aug 2010 20:06:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.34.140 with SMTP id l12mr2109224ibd.73.1281150361061; Fri, 06 Aug 2010 20:06:01 -0700 (PDT) Received: by 10.231.144.83 with HTTP; Fri, 6 Aug 2010 20:06:01 -0700 (PDT) In-Reply-To: References: Date: Sat, 7 Aug 2010 15:06:01 +1200 Message-ID: Subject: Re: How to replicate to Couch.io From: Dave Cottlehuber To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Wil this should be pretty easy to set up using curl or in futon. You are better off having your couchone.com pull replication from your local db ie more reliable. assuming you have disabled admin party on both your boxes (futon interface, bottom righthand corner) then this should work fine: curl -v -H Content-Type:application/json -X POST -d '{"source":"http://admin:password@localhost.external.hostname.com/contact-m= anager", "target":"contact-manager"}' \ http://admin:password@iamwil.couchone.com/_replicate & you'll see replication get initiated in your couchone.com futon -> status -- http://iamwil.couchone.com:5984/_utils/status.html some common issues: admin party or passwords are not sorted out on both couches. local.ini needs to be bound to all IPs on your local couch, & accessible through selinux/firewall/router/internet/whatever. For example my local.ini has: ;bind_address =3D 127.0.0.1 bind_address =3D 0.0.0.0 & I can curl or telnet through on port 80 or 5984 from external. some useful options for your curl/json above explained on the wiki "create_target": true "continuous": true "cancel": true there are a few good wiki links http://wiki.apache.org/couchdb/Replication http://wiki.apache.org/couchdb/How_to_replicate_a_database working example - with creation of DB $ curl -H Content-Type:application/json -X POST -d '{"source": "http://admin:passwd@muse.net.nz:5984/cat", "target": "cat3", "create_target": true}' \ http://admin:passwd@muse.couchone.com:5984/_replicate -v * About to connect() to muse.couchone.com port 5984 (#0) * Trying 184.73.200.44... connected * Connected to muse.couchone.com (184.73.200.44) port 5984 (#0) * Server auth using Basic with user 'admin' > POST /_replicate HTTP/1.1 > Authorization: Basic YWRtaW46d3Vid3Vi > User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenS= SL/0.9.8l zlib/1.2.3 > Host: muse.couchone.com:5984 > Accept: */* > Content-Type:application/json > Content-Length: 95 > < HTTP/1.1 200 OK < Server: CouchDB/1.0.0 (Erlang OTP/R13B) < Date: Sat, 07 Aug 2010 02:58:49 GMT < Content-Type: text/plain;charset=3Dutf-8 < Content-Length: 398 < Cache-Control: must-revalidate < {"ok":true,"no_changes":true,"session_id":"72f695c7b4791e2f497f0e03a0503fea= ","source_last_seq":41,"history":[{"session_id":"72f695c7b4791e2f497f0e03a0= 503fea","start_time":"Sat, 07 Aug 2010 02:54:38 GMT","end_time":"Sat, 07 Aug 2010 02:57:30 GMT","start_last_seq":0,"end_last_seq":41,"recorded_seq":41,"missing_checke= d":0,"missing_found":9,"docs_read":11,"docs_written":11,"doc_write_failures= ":0}]} * Connection #0 to host muse.couchone.com left intact * Closing connection #0 On 7 August 2010 08:51, Wil Chung wrote: > Hi all, > > I seem to be missing something simple. I'm just seeing if I can > replicate from my local couchdb install to couch dot io.=A0I created a > db on my local install, and tried to replicate to the remote=A0version. > > for the source, I have "contact-manager" on local install > for the destination, I have "iamwil.couchone.com/contact-manager" > > contact-manager is an empty db on the remote. > But it doesn't work. Is it because there are admin permissions on the > remote db? If so, how do I set up the local couchdb instance so that > the remote can accept a replication? =A0Thanks. > > Wil >