cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S C <>
Subject RE: change cluster name retaining keypsace
Date Fri, 11 Jan 2013 21:26:19 GMT
Can this also be considered?
Connect to node using cassandra-cliuse system;set LocationInfo[utf8('L')][utf8('ClusterName')]=utf8('<new
cluster name>');exit;Run nodetool flush on the nodeUpdate cassandra.yaml file with new
cluster_nameRestart node.
Subject: Re: change cluster name retaining keypsace
Date: Thu, 10 Jan 2013 13:21:28 +1300

To change the cluster name:
1) Stop all nodes. 2) Delete  or move the LocationInfo sstables from /var/log/cassandra/data/system/LocationInfo3)
Change the cluster_name in cassandra.yaml4) Restart the nodes. 
You cannot do an incremental change of the cluster name. All nodes in the cluster must have
the same name. 
By only deleting the LocationInfo CF your schema will be preserved. You do not have to move
/ delete any of the user data. 
Hope that helps. 

-----------------Aaron MortonFreelance Cassandra DeveloperNew Zealand

On 10/01/2013, at 6:50 AM, Tim Dunphy <> wrote:Hello,
 I'm attempting to change my cluster name, yet retain my keyspace as it was. I know from what
I've read that this requires changing it within the cassandra cli (using system), changing
it in the cassandra.yaml file, and deleting the contents of the /var/lib/cassandra/data/system
directory. Then restart cassandra. 
  This does work. I am able to change my cluster name this way. But of course, since I deleted
my system information I have lost all reference to my keyspace. My app does not work and a
show keyspaces within the cassandra-cli does not show the keyspace. This does make a certain
amount of sense to me as I realize that the system kesyspace directory does contain information
on the keyspaces within this cassandra node.

So what I did was create a snapshot of my keyspace (joke_fire1)  with the command nodetool
-h localhost -p 7199 joke_fire1.
I then re-create the keyspace within the cassandra cli and copy just the .*db files back to
the keyspace directory. But that doesn't work a describe keyspace does not show my column
families and my app doesn't work. 

I even tried creating a tar archive of the keyspace directory and then rsyncing the entire
contents of the tar archive to the keyspace directory after creating the keyspace with the
same name in the casssandra-cli. Still no good.

I was wondering if I could get some advice on how to change my cluster name and yet either
retain or restore from backup properly my keyspace as it was before the cluster name change.

I tried following the backup and restore advice from both this guide:

And this guide:
I'm running cassandra 1.1.8.

GPG me!!

gpg --keyserver --recv-keys F186197B

View raw message