[Tutorial] How to reset KairosDB database to default (delete all data)

How to reset KairosDB database to default | delete all data

Currently I'm using KairosDB as my timeseries database for a project and sometimes I need to reset the database to default, that is, delete all data of the database.

I couldn't find how to do that in the KairosDB documentation, so I've found a way to delete the database by myself. I've posted how to reset KairosDB database to default on this Github issue, but you can find the same answer bellow:

# Enter Cassandra Query Language terminal
cqlsh

# Drop kairosdb keyspace (don't use "cqlsh>" before the command)
cqlsh> DROP KEYSPACE kairosdb ; 

# Exit Cassandra Query Language terminal (don't use "cqlsh>" before the command)
cqlsh> exit

# Stopping KairosDB (you can use systemctl instead of manual path)
sudo /opt/kairosdb/bin/kairosdb.sh stop

# Running KairosDB
sudo /opt/kairosdb/bin/kairosdb.sh start  

Hope it help you!

Fernando Paladini

Read more posts by this author.

Florianópolis, Brazil