Database Reference
In-Depth Information
NOTE
You don't have to move the snapshots somewhere else for backups. In case a node's datafile gets cor-
rupted, it will be much easier to restore if you leave them where Cassandra writes them.
If you want to restore a snapshot that you have previously taken, there are a few simple steps to
follow. Simply shut down the node and remove the old SSTables and commit logs. Then, copy
all the files from the snapshot directory into the regular data directory.
Clearing a Snapshot
You can also delete any snapshots you've made, say, after you've backed them up to permanent
storage elsewhere. To clear your snapshots, use the clearsnapshot switch on Nodetool.
You'll see output on the server like this:
DEBUG 14:45:00,490 Disseminating load info ...
DEBUG 14:45:11,797 Removing snapshot directory
/var/lib/cassandra/data/Keyspace1/snapshots
DEBUG 14:45:11,798 Deleting Standard2-1-Index.db
DEBUG 14:54:45,727 Deleting 1277675283388-Keyspace1
//...clearing out other data files
DEBUG 14:54:45,728 Deleting snapshots
DEBUG 14:45:11,806 Cleared out all snapshot directories
Note the behavior here: all snapshots are cleared, including those stored with the system table
for this keyspace.
Load-Balancing the Cluster
If you find that your cluster is becoming unbalanced, perhaps because many keys were inserted
within a certain range, you can redistribute data in order to balance out your cluster.
loadbalance and streams
Executing Nodetool with the loadbalance switch will decommission a node, sending its tokens
to other nodes, and then bootstrap it again. The loadbalance command is essentially a conveni-
ence wrapper around performing two separate tasks: decommission and boostrap .
You can monitor your load-balancing operation, which can take some time if you have a lot of
data, by issuing the stream switch to Nodetool.
Search WWH ::




Custom Search