Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

tsingh2k15_176037 avatar image
tsingh2k15_176037 asked ·

Moving data in cassandra tables to S3

Hi,

I have TTL set on my tables which will expire my table records based on set value. I want to move already stored old data from Cassandra table to S3 so that I can still use that data if needed from S3 once it is expired in cassandra tables.

I need some thoughts on how to do it in a better way so that existing read and write traffic is not impacted on that table from which I am moving the old data to S3.

Thanks!

cassandrattl
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

@tsingh2k15_176037 Once the data has expired, you will no longer be able to read them via CQL. Even when the data is still on disk, the tombstones will prevent a replica from returning the data. Eventually, deleted (expired) data that is past the gc_grace_seconds will get compacted out of the SSTables. For more information, see How is data deleted.

On the other hand if you want to archive SSTables to S3, you can create backups using nodetool snapshot then copy the snapshots to S3. For more information, see Taking a snapshot. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.