This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias shutdown="cass-gracefulStopDatabase-and-reboot" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A quick & dirty backup script for Cassandra running inside Docker. | |
# Assumes /var/lib/cassandra is mounted in the container as /var/lib/cassandra because | |
# docker inspect {{ .Volumes }} is not shell-friendly. (doable, but meh) | |
# Also assumes Cassandra was started with 'docker run --name cassandra'. | |
export PATH=$PATH:/home/atobey/bin:/usr/local/bin | |
set -e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//READ nodetool snapshot documentation in cassandra | |
//READ stack-overflow-topic gist or directly in stackoverflow -> http://stackoverflow.com/questions/25465904/how-can-i-restore-cassandra-snapshots | |
//EXPORT the databases schemas | |
cqlsh -e "DESCRIBE SCHEMA" > my_backup_name.schema | |
//Create snapshot of the whole server | |
nodetool snapshot my_backup_name | |
//Compress the backups |