Purging of data older than 1 month

Hi All,

I want to purge bulk data older than one month from my couchbase bucket.
Is there any bulk utility available in couchbase for this.

Thanks
Ritu

You could use a N1QL query to delete the data, assuming that you have a field that you can use as a date marker.

Have you thought about adding a TTL to the documents so that they delete themselves after a specific age?

Hi Clintonq1,

Thanks for your reply.This is what we are doing currently.I was hoping if there could be any utility to this task.

Thanks
Ritu

Hi @ritu.kumari

Additionally, you can also an expiration date in your documents, they will be automatically removed after the target date.

https://developer.couchbase.com/documentation/server/current/sdk/core-operations.html#devguide_kvcore_generic__expiry

Thanks Denis.
I was curious if there is any archival utility in couchbase where we can retain data apart from from setting expiry date flag.

Thanks
Ritu