Orange-OpenSource / casskop

This Kubernetes operator automates the Cassandra operations such as deploying a new rack aware cluster, adding/removing nodes, configuring the C* and JVM parameters, upgrading JVM and C* versions, and many more...
https://orange-opensource.github.io/casskop/
Apache License 2.0
183 stars 54 forks source link

Cassandra restore on different cluster #366

Open packer136 opened 3 years ago

packer136 commented 3 years ago

Type of question

General context and help around casskop

Question

I want to perform a restore on a different, new Kubernetes cluster than backup is prepared. As far as I can see, if you want to create a CassandraRestore object, some CassandraBackup object is required to be referenced from that one. The problem is that since I do restore on a new K8S cluster, I do not have any CassandraBackup object previously defined. When I create a new Backup object on the new cluster, a new, independent backup is created in the remote storage, located in different paths.

Is there any way to move backup data from old cluster to the new cluster using CassKop?

What did you expect to see? Perform restore on the new K8S cluster from a backup created on old K8S cluster.

What did you see instead? Under which circumstances? New CassandraBackup needs to created before creating Restore what cause creating backup files independent on old backup files. Cannot restore old backup on a new cluster.

Environment

fdehay commented 3 years ago

Hi @packer136, Thanks for opening this issue. Unfortunately, this is not the way Casskop has been designed. The cassandrarestore object needs a cassandrabackup reference to use its secret and backup location. At the design time, it seemed logical not to duplicate the information. If you want, you can open a PR with the changes, adding the options in the crds and making the reference to backup not compulsory. Keep in mind that restoring to a new cluster has its challenges with the new cluster needing the exact same configuration as the original one. As I wrote in an earlier issue, Orange is scaling down its involvement in Casskop so this will not be done on our side.