nuvo / cain

Backup and restore tool for Cassandra on Kubernetes
Apache License 2.0
32 stars 21 forks source link

Could not describe schema!! #28

Open AkashRajvanshi opened 3 years ago

AkashRajvanshi commented 3 years ago

Hey, I use cain to backup my Cassandra deployment ( I use bitnami chart of Cassandra ). but it will throw an error could not describe schema. Can you please help how can I resolve this??

kubectl logs -f pod/cassandra-backup-test-1614676800-n6lk4                                      
2021/03/02 09:21:14 Backup started!
2021/03/02 09:21:14 Getting clients
2021/03/02 09:21:14 Getting pods
2021/03/02 09:21:14 Testing existence of data-dir
2021/03/02 09:21:14 Backing up schema
2021/03/02 09:21:17 Could not describe schema. make sure a schema exists for keyspace "test" or restore it using "--schema". error in Stream: command terminated with exit code 1
BeardyC commented 3 years ago

I had a similar error but it was due to authentication. Are you using authentication on the cassandra cluster? In case you have, you'll need to set up cqlshrc on each pod with the [authentication] section so that when cain execs it can connect to the cluster.

AkashRajvanshi commented 3 years ago

yes, I use authentication on Cassandra. Can you please how should I implement this??

BeardyC commented 3 years ago

Cain execs onto the Cassandra pods and uses cqlsh commands so the credentials need to be set up.

You'll need to add an init script to your helm chart which will load your credentials from a secret and populate the file mentioned above. Documentation for configuration.