Reputation: 151
Provide recommended configuration to migrate the data from the single data center cassandra cluster to multiple data center cassandra cluster. Currenlty i have the single data center cluster environment with following configurations, i) No of nodes: 3 ii) Replication Factor : 2 iii) Strategy: SimpleStrategy iv) endpoint_snitch: SimpleSnitch
And now i am planning to add 2 more nodes which is in different location. So i thought of moving to Multiple data center cluster with following confiruations. i) No of nodes: 5 ii) RF: dc1=2, dc2=2 iii) Strategy: NetworkTopolofyStrategy iv). endpoint_snitch: PropertyFileSnitch (I have the cassandra.topolofy.properties file)
What is the procedure to migrate the data without losing any data?
Please let me know the recommended steps to follow or any guide which i can refer. Please let me know if further info is required.
Upvotes: 1
Views: 1984
Reputation: 460
I just found this excellent tutorial on migrating Cassandra: Cassandra Migration To EC2 by highscalability.com
Although the details will be found at the original article, an outline of the main steps are:
Upvotes: -1
Reputation: 1931
Update keyspaces with NetworkTopologyStrategy and replication factor to match the original RF
ALTER KEYSPACE keyspace_name WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'datacenter_name' : 2 };
Change snitch on each node with restart.
Add nodes in a different datacenter. Make sure that when you add them you have auto_bootstrap: false in the cassandra.yaml
Run nodetool rebuild original_dc_name
on each new node.
Upvotes: 2