Reputation: 21
I have set up a Cassandra cluster with 2 dc. DC1 - 9 nodes, rep 5, consistency - local quorum. DC2 - 4 nodes, rep 3, consistency - local quorum. Have been testing backups and restore and observed that it takes very long time to repair the node after restoring data. System.log and compactionstats shows that most of the time is spent rebuilding secondary indices. Looking answers for:
Is there a way to backup and restore secondary index? How does Cassandra repair secondary index? does it always go through full rebuild? Is there a way to specifically exclude secondary index rebuild from nodetool repair process?
Backup strategy: snapshot-based, stored in cloud. Lucene directory holding index is also backed up
Restore strategy: Restore sstables from snapshots, copy back Lucene directory.
Upvotes: 2
Views: 284
Reputation: 340
When you run nodetool snapshot
it also takes a snapshot of secondary index.
From instaclustr doc: The exact location and the file naming convention used for the backed up files depends on the type of secondary index and the version of Cassandra.
Upvotes: 0