I'm not sure exactly what is or how to filter replicate, someone have a link to a page describing how to do this? I have a feeling, though, that I wouldn't be able to do it because the list of the specific ids I needed to remove were in a sqlite database and there was no way to determine the "bad documents" solely on their content.
-Tim On Mon, May 21, 2012 at 12:03 AM, Paul Davis <[email protected]>wrote: > Yeah, likely the best way to undo this would be to use filtered > replication to a local db and then rename the .couch files and reboot > to get it swapped over. > > On Fri, May 18, 2012 at 1:02 PM, Jim Klo <[email protected]> wrote: > > Not sure how many docs you have, but can you filter replicate the good > docs > > into a new db? > > > > > > Jim Klo > > Senior Software Engineer > > Center for Software Engineering > > SRI International > > > > On May 18, 2012, at 10:39 AM, Tim Tisdall wrote: > > > > After further reading it seems like I could use _purge ... However, I > > still need to query the DB to fetch all the revisions. > > > > On Fri, May 18, 2012 at 12:12 PM, Tim Tisdall <[email protected]> wrote: > > > > I accidentally created several million documents in my DB which I'd like > > > > to undo. ^_^ I know I can query each document to get the revision and > > > > then issue a DELETE, but that seems like a lot of additional work. Also, > > > > the wiki says "Deleted documents remain in the database forever, even > after > > > > compaction, to allow eventual consistency when replicating." and that's a > > > > lot of dead space. Is there a way that I can purge all of those > documents > > > > given that I have the _ids that they were saved under? I essentially > would > > > > like to return the DB to a state before I inserted all of those > documents. > > > > > > I'm also going to be inserting updated documents to the DB with those > same > > > > _ids, so another alternative is to post updates to each (but that would > > > > also require getting the revision ids) and then clearing out old > revisions. > > > > However, this would require fetching several million revision ids and > then > > > > figuring out how to force the DB to clear out all old revisions. > > > > > > -Tim > > > > > > >
