Revision as of 04:09, February 26, 2015 by Jerickso (talk | contribs)
Jump to: navigation, search

Backing up and restoring Cassandra storage

You can back up your Cassandra storage folders and use the saved storage folders to restore your Cassandra data if needed.

Backing up Cassandra data

Backing up your Cassandra storage folder requires you to:

  • flush the Feature Server Cassandra keyspace on all Feature Server nodes, then
  • save the Cassandra storage folder of each node

Flushing the Feature Server Cassandra keyspace

Cassandra CLI provides a command line tool called the node tool that enables the flushing of Cassandra data using the flush command.

Warning
On the Unix/Linux platforms, you can flush all the nodes in a datacenter by running the flush command using a parallel ssh utility, such as pssh.

For each Feature Server instance:

  1. Change to the Feature Server deployment location
  2. Check the vms-port parameter in launcher.xml. This is the web service port for Feature Server, Say it’s 8080
  3. Change to the ‘lib’ directory as follows:

For linux: cd work/jetty-0.0.0.0-8080-fs.war-_fs-any-/webapp/WEB-INF/lib For windows: cd work\jetty-0.0.0.0-8080-fs.war-_fs-any-\webapp\WEB-INF\lib

  1. Check the JMX port parameter in launcher.xml. This is the JMX port for Feature Server, Say it’s 9192
  2. Now run the nodetool flush command, while Feature Server is running:

For Linux: java -cp libthrift-0.7.0.jar:cassandra-thrift-1.1.6.jar:commons-cli-1.1.jar:cassandra-all-1.1.6.jar org.apache.cassandra.tools.NodeCmd -h localhost -p 9192 flush sipfs java -cp libthrift-0.7.0.jar:cassandra-thrift-1.1.6.jar:commons-cli-1.1.jar:cassandra-all-1.1.6.jar org.apache.cassandra.tools.NodeCmd -h localhost -p 9192 flush system For Windows: java -cp libthrift-0.7.0.jar;cassandra-all-1.1.6.jar;cassandra-thrift-1.1.6.jar;commons-cli-1.1.jar org.apache.cassan dra.tools.NodeCmd -h localhost -p 9192 flush sipfs java -cp libthrift-0.7.0.jar;cassandra-all-1.1.6.jar;cassandra-thrift-1.1.6.jar;commons-cli-1.1.jar org.apache.cassan dra.tools.NodeCmd -h localhost -p 9192 flush system

Note: In case of unix/linux platform to flush all the nodes in a datacenter, run the flush command using a parallel ssh utility, such as pssh.

Comments or questions about this documentation? Contact us for support!