couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From max <>
Subject Re: Get a deleted doc back: v 2.0.0
Date Tue, 21 Feb 2017 10:30:22 GMT

Use _changes on the database you'll see your deleted doc with the 'deleted
: true' then grep the last revision. From here you'll be able to get your
document with this specific (last) revision (?rev=xxxxxxxx).
If you add the query parameter revs=true couchdb add the "_revisions"
property and you should be able to get any available revision.



2017-02-20 12:18 GMT+01:00 John Le Brasseur <>:

> Hi.
> Just to be absolutely sure.
> I added "_deleted:true" into a document in fauxton.
> Fine.
> Using the command line I used GET.../db/doc?revs_info=true the answer is :
> {"error":"not_found","reason":"deleted"}
> OK
> So this means there is no _previous_ revision information available.
> (_changes info gives the last _rev)
> To be clear this means that without a backup of the database, the document
> _cannot_ be rescued?
> In this case I created a new document, and added the previous data which I
> obtained from my backup database.
> Are my statements correct and was my method correct and the only way out?
> I did find the option "db/doc?open_revs=true" which did give me the
> previous information.
> Would this then be the first option?
> (Should I not have added "_deleted: true" into Fauxton but rather have
> deleted the document in another way?(clicking and deleting, or using curl
> from the command line) or should the previous revision number have been
> present? I would have thought so. I have not compacted or
> anything.("compact_running": false)))
> Many thanks.
> John

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message