koriwi / cassandra-migrate-keyspace-from-cluster

Import/export Cassandra data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Migrating from cassandra cluster to another

Apache Cassandra is a free and open-source distributed NoSQL database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure.

There is some documentation out their about how to migrate from one cluster to anoter :

Here is some script to help you do that quite easily, method doesn't care if you're restoring on the cluster or to another cluster, with same or different topology :

Create an export

The export script export.sh is doing all that, just run it like that on one of the Cassandra cluster node :

$ ./export.sh <keyspace name>

You can have a list of your keyspace with desccribe keyspaces

Transfer the tar file to one of the node of the new cluster.

Import data

Now you need to import data to do so, you have to :

  • Drop the old keyspace
  • Create the keyspace schema
  • Import date into table with sstableloader

That what the import.sh script is doing from the previous generated tar file.

$ ./import.sh <keypsace backup tar file>

About

Import/export Cassandra data


Languages

Language:Shell 100.0%