Skip to content

nutellinoit/cassandra-migrate-keyspace-from-cluster

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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> <data dir>

eg:

$ ./export.sh mooncake /data/cassandra/data

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 <keyspace backup tar file>

About

Import/export Cassandra data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%