To change the cluster name: 1) Stop all nodes. 2) Delete or move the LocationInfo sstables from /var/log/cassandra/data/system/LocationInfo 3) Change the cluster_name in cassandra.yaml 4) 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 Morton Freelance Cassandra Developer New Zealand @aaronmorton http://www.thelastpickle.com On 10/01/2013, at 6:50 AM, Tim Dunphy <bluethu...@gmail.com> 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: > > http://jonathanhui.com/cassandra-data-maintenance-backup-and-system-recovery > > And this guide: > > http://www.datastax.com/docs/1.1/operations/backup_restore > > I'm running cassandra 1.1.8. > > Thanks > Tim > > -- > GPG me!! > > gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B >