Hecuba is a highly optimized utility that takes care of multi node backup and restore using Amazon S3 as the storage container.
- Take full snapshot - Passes only the incremental changes to S3, reduces the data transfer over network.
- Take incremental backups - Supports incremental backups and again reduces data tranfer by selectively transferring diffs.
- Restore - Can restore to any given time using the full snapshots and relevant incremental backup.
- List all available snapshots.
- Take mysql dump & upload to Amazon S3
This utility is designed to handle huge database sizes (and has beed tested to the tune of 500 GB). Utility works to minimize load on system & for faster result.
# Install python
$ apt-get install python
# Install python-pip
$ apt-get install python-pip
# Install yaml
$ pip install yaml
# Install boto
$ pip install boto
# Install AWS-CLI (bundled installer)
$ wget https://s3.amazonaws.com/aws-cli/awscli-bundle.zip
$ unzip awscli-bundle.zip
$ sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
$ aws --version
Hecuba takes Keyspace
as user input & triggers Snapshot
against provided Keyspace
.
Following arguments are needed to trigger full snapshot
-
Keyspace name
-
IPs of nodes for which the backup needs to be triggered (IP list needs to be provided as user input and has to be in quotes and comma separated).
# Trigger Backup ( i.e. <hecuba.py> <backup> <Keyspace> )
$ python hecuba.py backup demo
Note : nodes log can be found at <nodes>/root/backup.log
To trigger incremental backup following inputs are needed
-
Keyspace name
-
IPs of nodes for which the backup needs to be triggered (IP list needs to be provided as user input and has to be in quotes and comma separated).
# Trigger Backup ( i.e. <hecuba.py> <backup> <Keyspace> )
$ python hecuba.py incremental demo
Note : nodes log can be found at <nodes>/root/backup.log
To trigger resotre following inputs are needed
-
Keyspace name
-
IPs of nodes for which the backup needs to be triggered (IP list needs to be provided as user input and has to be in quotes and comma separated)
-
Date (restore point)
# Trigger Backup ( i.e. <script> <restore> <Keyspace> <restore_point>)
$ python hecuba.py restore demo 20150810
Note : nodes log can be found at <nodes>/root/restore.log
It lists all available snapshots
# List Snapshots ( i.e. <getListOfAvailableSnapshots.py> <Bucketname> <Keyspace> )
$ python getListOfAvailableSnapshots.py cassandra-backup-dir demo
To trigger Mysql Dump following inputs are needed
-
Database User Name
-
Database Password
-
Database Name
-
IPs of nodes for which the backup needs to be triggered (IP list needs to be provided as user input and has to be in quotes and comma separated)
# Trigger Backup ( i.e. <script> <mysql> <dbUserName> <dbPassword> <dbName>)
$ python hecuba.py mysql root test testdatabase
Note : nodes log can be found at <nodes>/root/mysqlBackup.log