Reputation: 11
I need to copy data from keyspace database1 to keyspace database18.
It's not an option to use csql COPY command (at least I don't know how to make such script), because I have 103 different tables with all imaginable columns in it.
Keyspaces already created, schema applied.
I already tried to make a snapshot and then copy (mv)
1. mv /data/cassandra/data/database1/tables/snapshot/copy/* /data/cassandra/data/database18/tables/*
I also tried to reboot one of my servers:
nodetool disablegossip
nodetool drain
reboot
There are no data in new keyspace tables.
When I enter csql use database18; select * from table1;
I receive an empty table "(0 rows)"
Cassandra version is: [cqlsh 5.0.1 | Cassandra 2.1.17.1439
Maybe there something I missing or different way exists to achieve this?
Any help or suggestions are welcome, thank you!!!
Upvotes: 1
Views: 1114
Reputation: 2196
I guess your options are: 1) cql copy and/or dse bulk 2) sstableloader 3) code 4) 3rd party product (we have a product for backing up and restoring - and can do so to different clusters, if desired (Formerly Talena, Formerly Imanis, Now Cohesity)
If the tables are large, and the node-count is small, I would say use sstableloader. Works well.
-Jim
Upvotes: 2