开发者

CouchDB replicate without deleting documents

开发者 https://www.devze.com 2023-01-19 01:19 出处:网络
Hi: I want to use a mobile CouchDB and a remote CouchDB. To transfer from mobile to remote DB I want to replicate the data. But for storage reasons I want to regularly delete old data from the mobile

Hi: I want to use a mobile CouchDB and a remote CouchDB. To transfer from mobile to remote DB I want to replicate the data. But for storage reasons I want to regularly delete old data from the mobile CouchDB and keep it on the remote CouchDB. As what I have seen local deletion will also be replicated. Is there any knowledge about how to h开发者_开发问答andle this?


You should be able to use filtered replication, http://wiki.apache.org/couchdb/Replication#Filtered_Replication, with a filter function of:

function(doc) {
    return !doc._deleted;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号