Linux

Where Does Cassandra Store Data and Config?

Cassandra reads cassandra.yaml in /etc/cassandra with SSTables and commitlog under /var/lib/cassandra.

Last updated

Cassandra separates config from storage across two trees. The YAML file in /etc/cassandra sets cluster name, seeds, and data paths. SSTables, commitlog, and caches accumulate under /var/lib/cassandra by those settings.

Every node needs a matching cluster name with distinct addresses. Tokens assign automatically unless replaced explicitly. Back up with snapshots rather than live copies, since SSTables rewrite constantly.

Where Cassandra stores this, by platform

Linux
/var/lib/cassandra

SSTables in data, commitlog beside it, caches in saved_caches. Config lives in /etc/cassandra/cassandra.yaml. Snapshot before file copies.

Frequently asked questions

How do I back up Cassandra?

Run nodetool snapshot per keyspace, then copy the snapshot folders with the YAML file. Live copies without snapshots corrupt. Restore per node with matching tokens.

Where is the Cassandra config?

As cassandra.yaml in /etc/cassandra with environment overrides beside it. Seeds and listen addresses live there. Rolling restarts apply most changes.

Notice an outdated path? Let us know.