CassandraBackup

CassandraBackup is a command line tool for dumping and restoring a Cassandra keyspace.

Dumping a Keyspace

Run cassandra_dump, specifying the keyspace:

cassandra_dump depot_production > backup.cql

Restoring a Keyspace

Run cassandra_import, specifying the keyspace:

cassandra_import depot_production < backup.cql

Options

--servers: A list of servers. Defaults to 127.0.0.1:9160. (--servers 127.0.0.14:9169,127.0.1.19:9100)
--version: Set cassandra version. Defaults to latest. (--version 1.0)
--tables: The tables to dump. Defaults to all. (--tables widgets,people)
--where: A condition to apply to all queries (--where="state='WA'")

Notes on options

Options such as –servers and –tables support arrays in multiple formats. All of the following are the same:

--tables Widgets,People
--tables "Widgets People"
--tables Widgets --tables People