Delete data from Couchbase

#1

How to delete data from Couchbase server which are of more than 1 day old

#2

If you don’t use sync gateway or any versioning system you could go to the couchbase console, lookup the document by id, and then delete it from there.

#3

You can use the remove or delete method of your favorite client library. There is also the cbc rm command bundled with the C client (libcouchbase)

#4

Hi alexegli,

Thanks for your response. Actually my requirement is to auto delete the couchbase 1 day data. Just looking for an option in Couchbase which will delete the 1 day old data automatically without any outside scheduler job.

Thanks
Stalin

#5

To auto-delete it, set it with an expiration (sometimes called time to live or TTL) value of 86,400. Couchbase will automatically delete it after that. See the section about metadata in the documentation.