Nate
Nate

Reputation: 7856

Retrieve deleted document with Cloudant

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

Upvotes: 1

Views: 902

Answers (1)

Glynn Bird
Glynn Bird

Reputation: 5637

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.

Upvotes: 1

Related Questions