nuvo / cain

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

Restore multiple node cluster : Error with table ***, found X directories #17

Open blatinier opened 5 years ago

blatinier commented 5 years ago

Hello, I'm using cain to backup & restore a cassandra cluster on kubernetes and I have the following error when I restore my cassandra :

2019/09/12 14:54:01 Error with table my_table, found 2 directories

The 2 directories match with my two nodes. The tree of my cain generated in S3 backup looks like that:

bucket
-- default
-- -- Cassandra
-- -- -- keyspace_name
-- -- -- -- schema_id
-- -- -- -- -- tag_name
-- -- -- -- -- -- cassandra-0
-- -- -- -- -- -- -- my_table
-- -- -- -- -- -- cassandra-1
-- -- -- -- -- -- -- my_table

cassandra-0 and cassandra-1 are my pod names The restore command I used:

./cain restore -n default -l name=cassandra -k keyspace_name --src=s3://bucket/default/Cassandra -t "tag_name" --schema schema_id

The full log:

2019/09/12 14:54:01 Getting current schema
2019/09/12 14:54:01 Found schema: schema_id
2019/09/12 14:54:01 Calculating paths. This may take a while...
2019/09/12 14:54:01 Error with table my_table, found 2 directories

I tried to play a lot with the --src the tag_name with no luck. Is there something I am missing regarding the cassandra restore into a multi node cluster?

blatinier commented 5 years ago

Solved here: https://github.com/maorfr/cain/issues/2 Not a cain problem, just unclear error message and/or not enough experience from me