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

balajimc999@gmail.com avatar image
balajimc999@gmail.com asked Erick Ramirez edited

How can we recover a SSTable if it is corrupted or deleted at the OS level?

How can we recover sstable if it is corrupted or deleted at the OS level?

restorescrub
10 |1000

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

1 Answer

steve.lacerda avatar image
steve.lacerda answered steve.lacerda commented

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.

2 comments Share
10 |1000

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

Thank you Steve.

What can we do if sstable is corrupted?

We have RF 3

0 Likes 0 ·
steve.lacerda avatar image steve.lacerda ♦ balajimc999@gmail.com ·

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.

1 Like 1 ·