I am working on a project which uses couchdb. Actually before I was working with the database which has 1000 of documents, and now I have moved to new database it's also has many new documents than other's. If I copy all documents one by one it will take too much time, is there any other method so that i can copy the specific documents from one database and paste it into new one. Because couchdb is new for me and I didn't find any satisfactory answers on internet. If anybody knows, please let me know the query or method for copy and paste in couchdb? Thank you in advance.
Asked
Active
Viewed 1,217 times
1 Answers
4
Yes and it is called replication.
You can combine it with a filter if you need to copy only specific documents.

Simon
- 31,675
- 9
- 80
- 92
-
Thank you, but I have never used Couchdb before there are three codes 1. function(doc, req) { if (doc.type && doc.type == "foo") { return true; } else { return false; } } 2. { "_id":"_design/myddoc", "filters": { "myfilter": "function goes here" } } 3. {"source":"http://example.org/example-database","target":"http://admin:password@127.0.0.1:5984/example-database", "filter":"myddoc/myfilter"} so where should I write these code, can I directly write them into couchdb source? – shashank May 01 '12 at 03:34
-
There is also text between the codes snippets that explains them… If you are new to CouchDB, you should really [learn about it](http://guide.couchdb.org/) before being able to do what you ask. – Simon May 01 '12 at 03:40