This file contains hidden or 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/sh | |
set -e | |
# script to install maven | |
# todo: add method for checking if latest or automatically grabbing latest | |
mvn_version=${mvn_version:-3.5.2} | |
url="http://www.mirrorservice.org/sites/ftp.apache.org/maven/maven-3/${mvn_version}/binaries/apache-maven-${mvn_version}-bin.tar.gz" | |
install_dir="/opt/maven" |
This file contains hidden or 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 | |
passwd root <<_EOF_ | |
root | |
root | |
_EOF_ | |
rm -fr /etc/mysql | |
iptables -F | |
apt-get update | |
cd /tmp | |
wget http://mirror.netcologne.de/apache.org/couchdb/source/1.5.0/apache-couchdb-1.5.0.tar.gz |
This file contains hidden or 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
from trove.guestagent.strategies.backup import base | |
from trove.guestagent.datastore.cassandra import service | |
from trove.common import utils | |
class CassandraDump(base.BackupRunner): | |
""" Implementation of Backup Strategy for CassandraDump """ | |
__strategy_name__ = 'cassandradump' | |
# The '-' will redirect the output to stdout for streaming |
This file contains hidden or 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 | |
cd /home/cassandra | |
local_addr=`ifconfig | grep "inet addr:" | awk '(NR==1)' | awk -F":" '{print $2}' | awk '{print $1}'` | |
backup_dir="/home/cassandra/cassandra_backup" | |
week_ago=`date +%F -d'now -1 week'` | |
cassandra_dir="/opt/cassandra/bin/" | |
stor_dir=`cat /opt/cassandra/conf/cassandra.yaml | grep cassandra/data | awk '{print $2}'` | |
mount_dir="/home/cassandra/s3storage" | |
bucket_name="clickatell-prod-backups" |
This file contains hidden or 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 | |
#you should run this script from directory with unpacked backups | |
#find directory with cassandra/data | |
data_dir=`find . -type d -name data` | |
#looking for all keyspaces in data directory | |
for keyspace in `ls -la ${data_dir} | awk '{print $9}' | grep -v "[.]" | grep -xv ""` |