Reputation: 2104
Theoretical question:
Lets say I have a cassandra cluster with some data in it. Backups are created on a daily basis. Now a subset of data is being lost, either by application error or manual deletion.
What is the best way to restore data from existing backup? I can think of starting a separate node with the backup disk attached, then export data manually through selects and reimport into the prod database.
That would work but sounds complicated, is there a more straight forward solution for such problems?
Upvotes: 1
Views: 154
Reputation: 16400
If its a single partition probably best bet is to use sstabledump or something like sstable-tools to read from it and just manually reinstert. If ok with restoring everything deleted from time of snapshot: reduce gcgrace to purge any tombstones with a force compact (or else they will continue to shadow the restored data) and use the sstable loader or if the token ranges are the same copy the backed up sstables back in the data directory.
Upvotes: 4