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

Backing up and restoring Cassandra data

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

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

Tip
On the Linux platform, 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. Verify the vms-port parameter in launcher.xml. The default value is 8080.
  3. Change to the lib directory:
    • 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
  4. Verify the JMX port parameter in launcher.xml. The default value is 9192.
  5. While Feature Server is running, run the nodetool flush command:
    • 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.cassandra.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.cassandra.tools.NodeCmd -h localhost -p 9192 flush system
  6. For each Feature Server instance, copy the Cassandra storage folder to a safe location.

Restoring Cassandra data

To restore your Cassandra data from your backed-up storage folders:

  1. Stop all Feature Server instances.
  2. Copy the storage folder backups to their original location on each Feature Server.
  3. Restart each Feature Server instance, beginning with the master instance.
Comments or questions about this documentation? Contact us for support!