Retrieve deleted document with Cloudant

888 Views Asked by At

I have deleted documents by mistake in Cloudant but can't find a way to retrieve them. I have followed this tuto: http://garmoncheg.blogspot.com/2013/11/couchdb-restoring-deletedupdated.html

And this answer: Retrieve just deleted document

Without success... What is the normal procedure? Each time I try to get a specific revision of deleted document: https://address/mydb/$id?rev=$rev I get only a partial document

1

There are 1 best solutions below

1
On

If you're quick, you can retrieve the body of a recently deleted document with GET /mydb/id?rev=x where x is the old revision number. But periodically Cloudant (and CouchDB) performs a "compaction" operation that removes the bodies of older revisions that are no longer required. That would leave older document with only its _id, _rev and _deleted=true, which is, I suspect, what you are seeing.