You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Travis Paul <Tr...@visPaul.me> on 2011/07/31 19:02:38 UTC
Does remote replication require the database to exist on target?
Running CouchDB version 1.2.0a-1142703 on a local and remote machine using
Futon.
I tried replicating a local database to a remote CouchDB instance that did
not yet have a copy of the database and I was getting an error using:
local: somedatabase
target: http://admin:somepassword@www.mydomain.com:5984/somedatabase
"Replication failed: could not open http://admin:******@
www.mydomain.com:5984/somedatabase"
I also tried omitting the target database name and got a different error:
Replication failed: [{couch_replicator,fold_replication_logs,6},
{couch_replicator,init_state,1},
{couch_replicator,do_init,1},
{couch_replicator,init,1},
{gen_server,init_it,6},
{proc_lib,init_p_do_apply,3}]
I could not get the database to replicate until I first logged into the
target and created a database with the same name, then replication worked.
Is this normal behavior? I didn't see anything in the online book or wiki
about having to first create the database on the target. Did I do something
wrong?
Thanks
Re: Does remote replication require the database to exist on target?
Posted by Robert Newson <rn...@apache.org>.
http://wiki.apache.org/couchdb/Replication
"The target database has to exist and is not implicitly created. Add
create_target:true to the JSON object to create the target database
(remote or local) prior to replication. "
B.
On 31 July 2011 18:02, Travis Paul <Tr...@vispaul.me> wrote:
> Running CouchDB version 1.2.0a-1142703 on a local and remote machine using
> Futon.
>
> I tried replicating a local database to a remote CouchDB instance that did
> not yet have a copy of the database and I was getting an error using:
>
> local: somedatabase
> target: http://admin:somepassword@www.mydomain.com:5984/somedatabase
>
> "Replication failed: could not open http://admin:******@
> www.mydomain.com:5984/somedatabase"
>
> I also tried omitting the target database name and got a different error:
>
> Replication failed: [{couch_replicator,fold_replication_logs,6},
> {couch_replicator,init_state,1},
> {couch_replicator,do_init,1},
> {couch_replicator,init,1},
> {gen_server,init_it,6},
> {proc_lib,init_p_do_apply,3}]
>
> I could not get the database to replicate until I first logged into the
> target and created a database with the same name, then replication worked.
>
> Is this normal behavior? I didn't see anything in the online book or wiki
> about having to first create the database on the target. Did I do something
> wrong?
>
> Thanks
>