question

nagasree963_193876 avatar image
nagasree963_193876 asked Erick Ramirez answered

Does Cassandra support instance cloning?

Is there any instance cloning for cassandra. It means from production to a lower environment(development or testing env). If supports, how can we achieve it

cassandrarestore
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered manoj.sharma99765_192577 edited

Cassandra does not provide a cloning feature that is you're probably thinking of. This is because creating an image of a node then cloning it means that it contains identical configuration. If a node with identical configuration (such as token allocation, cluster name, seeds and IP addresses) is brought online, it would automatically join an existing cluster which is not what you want.

Instead, you need to build a new cluster and restore the data snapshots. The high-level steps are:

  • take a snapshot of the nodes in the existing cluster
  • build a new cluster with identical topology and allocate the same tokens as the source nodes
  • create the application schema in the new cluster
  • copy the contents of each application table from source to the equivalent destination node
  • run nodetool refresh to make Cassandra load the new SSTables

For the detailed instructions, see Restoring a snapshot into a new cluster. Cheers!

Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.