How can we recover sstable if it is corrupted or deleted at the OS level?
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
If an sstable is deleted it cannot be recovered unless you have a backup. Alternatively, if this cluster is replicated, meaning you have a replication factor greater than 1, then you could just run a repair on that table and the sstable will get regenerated. If you have an RF of 1 only, then there's no alternative but to restore from backup/snapshot.
Thank you Steve.
What can we do if sstable is corrupted?
We have RF 3
You have a few options with an rf=3:
1) delete the sstable and repair the table
2) nodetool scrub
3) sstablescrub
Nodetool scrub is an online tool, so you can give that a try and see if the stdout reports anything. Alternatively, you can take the node offline and then run sstablescrub which is much more thorough. Lastly, and easy enough is just remove the sstable that's causing a problem and run a repair on the table which will regenerate the missing data.
One note with nodetool repair, be sure you haven't repaired the table with incremental repair in the past. To do so, I would run nodetool mark_unrepaired first, then run nodetool repair.
7 People are following this question.
Is it possible to migrate data from a Cassandra cluster in k8s to a cluster in a VM?
Why is the data missing when I restore a full backup on a node?
Is there an easy way to copy a complete Cassandra database from one Linux server to another?
Does OpsCenter API support restoring data to another cluster or location?
DataStax Enterprise is powered by the best distribution of Apache Cassandra ™
© 2022 DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.
Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries.
Privacy Policy Terms of Use