couchdb-replication mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Cottlehuber <...@jsonified.com>
Subject Re: Continuous Replication with Credentials?
Date Thu, 14 Aug 2014 08:09:42 GMT
 
> Hi folks, CouchDb Noob here..
> couchdb-1.6.0
>  
> I'm trying to setup replication such that it persists across restarts.
> My understanding to do this I must add a Document to: _replicator
>  
> In addition I have created an admin account: admin:password
>  
> if create the document like:
>  
> |{
> "|source|":|"http://admin:password@SOURCE_HOST:5984/test"|,
> "|target|":|"http://admin:password@TARGET_HOST:5984/test"|,
> "|create_target|":|true|,
> "|continuous|":|true|,
> }|
>  
> it works..(which is good :)
>  
> my question is:
> if I create the replication doc like:
>  
> |{
> "|source|":|"test"|,
> "|target|":|"http://admin:password@TARGET_HOST:5984/test"|,
> "|create_target|":|true|,
> "|continuous|":|true|,
> }|
>  
> it will fail, as it has no credentials to read 'test' even though the
> process is running locally.
> I noticed as well that when using the http form for the source, that
> couchdb shows 'get' requests every x seconds for the replication..is there
> a way to specify credentials without using the http form on the source??
> (I tried un:pd@sourceDbName..didnt work)
>  
> Thanks
> Dan
>  

Hey Dan,  

As Jens mentioned, try this:  

POST /your_couch/_replicator  
{
_id: “replication_id”,
source: “here”,
target: “there”,
continuous:true,
owner:”admin",
roles:["_admin”]
}


A+
Dave


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