I need to take a keyspace from the server as a dump and restore that dump to my local cassandra, I know to do in mysql but how to do in nosql ? I learn from site that nodetool ,snapshot and csv file format can achieve this,but I unable to got it ?
You can do this with "nodetool". For a good reference documentation take a look here: http://www.datastax.com/docs/1.1/backup_restore
Roughly you need to perform the following steps:
nodetool snapshot <keyspace-name>
. This is run on the server, where you want to take generates a "snapshot". It will do that, storing a "snapshot" for each table of the keyspace.<cassandra-dir>/data/<keyspace-name>/<table-name>/snapshots/
(look for the "latest" taken snapshot - when you take the snapshot it tells you the "name"/"ID" of the snapshot taken). <cassandra-dir>/data/<keyspace>/<table-name>/
) and then place the "server" snapshots in each respective "keysapce table" (directly in the <cassandra-dir>/data/<keyspace>/<table-name>/
and not in the "snapshot" directory). HTH.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With