Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CouchDB not replicating design documents

I have a CouchDB 1.2.0 instance running on my laptop and I want to replicate a local database named "soup" to a remote machine, which runs a CouchDB 1.1.1 instance. I issue the replication from futon and I can see the request is alright:

Request URL:http://127.0.0.1:5984/_replicate
Request Method:POST
Request Payload: {"source":"soup","target":"http://projects.blurrcat.com/couchdb/soup"}

However, when the replication is done, all documents except the design documents are replicated. Can anyone tell me why? Is it because of the version difference?

like image 285
blurrcat Avatar asked Sep 20 '12 10:09

blurrcat


People also ask

How do you replicate a CouchDB database?

Simple Replication with the Admin InterfaceStart CouchDB and open your browser to http://127.0.0.1:5984/_utils/ . On the righthand side, you will see a list of things to visit in Futon. Click on “Replication.” Futon will show you an interface to start replication.

How are views replicated CouchDB instances?

Replication Procedure. During replication, CouchDB will compare the source and the destination database to determine which documents differ between the source and the destination database. It does so by following the Changes Feeds on the source and comparing the documents to the destination.

What is CouchDB design document?

Design documents are a special type of CouchDB document that contains application code. Because it runs inside a database, the application API is highly structured. We've seen JavaScript views and other functions in the previous chapters.


1 Answers

Design documents will only replicate if you are authenticated as an admin, or a db admin, on your target. Try something like setting your target as

http://admin:[email protected]/couchdb/soup
like image 65
Ryan Ramage Avatar answered Oct 24 '22 00:10

Ryan Ramage