As you know Cassandra offers several of it’s own backup tools like:
Snapshots,sstable2json etc..
Sometimes these tools require copying\moving files from directories to other directories and really it’s not something that I want to be doing just to simply export\importing small keyspaces. Sometimes you just want a quick and easy backup of your entire DB\key space to smoothly import into you development enviornment.
That’s how I found the tool Cassandradump by gianlucaborello:
github project link : https://github.com/gianlucaborello/cassandradump
This tool is so intuitive so easy just want I was looking for.
How its done ?
wget the link:
wget https://github.com/gianlucaborello/cassandradump.git
Go to the folder
cd cassandradump-master
run the backup tool as such (to backup the entire DB):
python cassandradump.py --export-file /path/to/dumpfile.cql
Done !
To import the file log in to your wanted DB and run the command:
cqlsh> source '/path/to/dumpfile.cql'