couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Troy Kruthoff <>
Subject Re: Questions on replication (how to prevent DELETEs and resync deleted documents)
Date Sun, 27 Dec 2009 17:17:53 GMT
I believe the revision does change when you delete the doc, meaning  
the delete will be replicated to your "master" for which you can  
monitor changes and un-delete the document, causing it's rev to again  
be modified and re-replicated to the slaves.


On Dec 27, 2009, at 8:38 AM, fana wrote:

> Hi,
> yesterday I played around with CouchDB's (0.10) replication feature.
> I have a database which should be something like a "master".
> Means, I want to replicate its complete content to other databases
> and from them all content back to the master.
> But I want to prevent documents to be deleted on the master
> which have (accidentally or not) been deleted on one of the other
> databases.
> I also want the master to resync the documents which were deleted on  
> the
> other databases.
> After playing around and reading the documentation
> I found that deleted documents get only resynced again
> if the revision was changed so the document appears in the "_changes"
> resource.
> Is it somehow possible to build a scenario like this?
> So,
> * How can I resync deleted documents
> without touching the doument and getting a new revision?
> * How can I prevent documents to be deleted
> and only integrate new or changed documents to the master?
> Thanks in advance

View raw message