Andy Drav
Andy Drav

Reputation: 1

Cassandra restore to K8ssandra using Medusa but does not create MedusaBackup resource

Working on moving our current EC2 based Cassandra clusters to Kubernetes K8ssandra, as well as some disaster recovery testing. We have Medusa doing our backups on a regular basis saving to S3, which is accessible to our K8ssandra deployment.

When creating a MedusaTask sync operation resource for K8ssandra, Medusa reads the manifest.json files from S3, but never creates the MedusaBackup resource object from which we can do the restore.

Both cluster names are identical; Both clusters are at Cassandra v4.1.5. K8ssandra-operator is v1.18.0; Medusa 0.22.0. I'm thinking this is partly due to naming conventions which are not compatible between clusters. Our EC2 based cluster is

Due to Kubernetes / K8ssandra naming conventions of size and capitalization, we have to use:

# Source: k8ssandra-clusters/templates/k8ssandra-cluster.yaml
apiVersion: k8ssandra.io/v1alpha1
kind: K8ssandraCluster
metadata:
  namespace: k8ssandra-operator
  name: testcluster-a
spec:
  cassandra:
    metadata:
    datacenters:
      - metadata:
          name: dc3
        size: 3
        racks:
          - name: rack1
          - name: rack2
          - name: rack3

From the Medusa logs, it shows it reading the backup schema.cql one nodes' tokenmap JSON, then all nodes manifest.json file, then disconnects from S3. So, Medusa can read the backup files, just doesn't seem to be doing anything with them.

One thing I have tried with a test backup is update the tokenmap files to change the names of the racks and datacenters to what is in our K8ssandra cluster, but still getting the same results. Was hoping that might aligning the names would help, or at least get something else which may be useful in the logs.

Upvotes: 0

Views: 215

Answers (1)

Erick Ramirez
Erick Ramirez

Reputation: 16353

Based on the description you supplied, it appears that you are attempting to clone an EC2-based cluster to a K8ssandra cluster that doesn't have an identical topology.

You won't be able to do a straightforward clone using Medusa in K8ssandra since the configuration of the source cluster is different.

As an alternative, you can try a restore-cluster of the source backup and supply a list of 2-3 nodes in the destination cluster with --seed-target. This method will use sstableloader to bulk load the snapshots to K8ssandra cluster and doesn't require the topology to be identical.

For additional info, see the Cassandra Medusa docs on Restoring a full cluster. Cheers!

Upvotes: 1

Related Questions