AHTAPOT is an easy, fast, and script-based backup and restore tool for ScyllaDB and Apache Cassandra databases.
It uses dsbulk and cqlsh to backup and restore schema and data.
Ideal for small to medium-sized environments.
- Fully automated backup & restore
- Works with all keyspaces, a specific keyspace, or a single table
- Option to backup schema and/or data
- Data backup in json or csv format
- Based on dsbulk and cqlsh
- Valid backup verification with Ahtapot signed backup file
- Backup duration measurement and reporting
- ScyllaDB or Apache Cassandra
cqlshdsbulk(DataStax Bulk Loader)- Java (8 or later)
- Python
- Bash (Linux/Unix based systems)
-
Clone this repo
git clone https://github.com/mustafazaimoglu/ahtapot.git cd ahtapot chmod +x ahtapot.sh -
Install dsbulk (check the official dsbulk releases for possible newer versions)
wget https://github.com/datastax/dsbulk/releases/download/1.11.0/dsbulk-1.11.0.tar.gz tar -xzvf dsbulk-1.11.0.tar.gz mv dsbulk-1.11.0 /opt chmod +x /opt/dsbulk-1.11.0/bin/dsbulk ln -s /opt/dsbulk-1.11.0/bin/dsbulk /usr/bin/dsbulk
-
Install other requirements from above
[BACKUP_DIR]
ββ [KEYSPACE_NAME]
β ββ keyspace.cql
β ββ keyspace_full.cql
β ββ [TABLE_NAME]
β ββ table.cql
β ββ dump/
β ββ operation/
ββ ahtapot-
Backup all keyspaces
./ahtapot.sh -h 127.0.0.1 -P 9042 -u cassandra -p cassandra \ --all-keyspaces \ --directory ./backup_2025_03_16 \ --format json \ --operation backup -
Backup a specific keyspace
./ahtapot.sh -h 127.0.0.1 -P 9042 -u cassandra -p cassandra \ -k my_keyspace \ -d ./backup_myks \ -f csv \ -o backup -
Backup a specific table
./ahtapot.sh -h 127.0.0.1 -P 9042 -u cassandra -p cassandra \ -k my_keyspace \ -t my_table \ -d ./backup_table \ -f json \ -o backup -
Restore all keyspaces from backup
./ahtapot.sh -h 127.0.0.1 -P 9042 -u cassandra -p cassandra \ -A -d ./backup_2025_03_16 \ -o restore
Mustafa ZAΔ°MOΔLU