0

I am trying to do a backup of all my data from Cassandra, in order to move them to a different machine.

I've been using nodetool to do this.

nodetool -h localhost snapshot -t my_backup keyspcace

After running nodetool, a new 'snapshot' folder gets created inside the folder of each column family, and that folder contains a folder named 'my_backup'. However, the size of this folder is rather small (under 10% of the size of the original folder). I've copied that folder onto my machine, stopped Cassandra, replaced the files inside each keyspace and started Cassandra back up.

However, now when I do a

select count(*) from something

I get a smaller number of entries than was on the original server.

Am I doing something wrong? How can I make a full backup of the data inside Cassandra in order to move them to a different machine?

  • What is your replication factor and cluster size? – shutty Dec 15 '15 at 12:00
  • Sorry, forgot to mention. At the moment, Cassandra runs on only one machine. So cluster size = 1, Replication factor = 1. – Florin Acsinte Dec 15 '15 at 12:13
  • What Cassandra version do you use? – Stefan Podkowinski Dec 15 '15 at 12:20
  • Using Cassandra 2.0.8. I just tried doing nodetool flush -- keyspace and it seems to be getting all of the information now(tested on a smaller, testing database). However, why are the backup files so small compared to the files in the original folders? For a 4GB folder, I am getting a 114MB backup.(for the 4GB version I could not determine if all of my entries are present in the backup) – Florin Acsinte Dec 15 '15 at 12:40

0 Answers0