-
Notifications
You must be signed in to change notification settings - Fork 2
Cassandra Restore Backup S3
- Install from datastax AMI HVM (not the one from github as it does not raid0)
OR
-
Install Cassandra from datastax repository
-
Create keyspace
cqlsh -f Schema
- Install AWS CLI
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
sudo apt-get install unzip
unzip awscli-bundle.zip
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
- Download snapshots and incremental backups from S3
aws configure
(give access key id and secret access key when prompted)
cd /mnt
sudo aws s3 cp s3://itrack/itrackcass ./s3 --recursive
sudo apt-get install lzop
for file in
find -name *.lzo; do lzop -d $file; done
find -name *.lzo -delete
- Restore from snapshot and backups
sudo service cassandra stop
move all backup and snapshot files to gps/table-name
for i in
ls; do dir=
echo $i | cut -d "-" -f 1; sudo mkdir /var/lib/cassandra/data/gps/$dir; sudo mv $i/backups/* /var/lib/cassandra/data/gps/$dir; sudo mv $i/snapshots/*/* /var/lib/cassandra/data/gps/$dir; done
sudo chown -R cassandra.cassandra /var/lib/cassandra/data
sudo service cassandra start
wait till cpu and io activity ceases. monitor by htop and iotop
nodetool repair -pr gps
- Run Tests