Persisting data with volumes and directories

Persisting data allows the container to be deleted and recreated without losing data. DataStax exposes the following volumes so that underlying data directories can be mounted. If these volumes are not mounted, then sub-directories will be unavailable. If they are mounted, then the data written within the container can be preserved in a local directory.

It is recommended that you familiarize yourself with the concept of using volumes with Docker.

If the volumes are not mounted from the local host, all data is lost when the container is removed.

To persist data in general, create the directories on the local host, and then map the local directory to the corresponding volume using the docker run -v flag:

docker run -v local_directory:container_volume

For DSE specifically, mount the /var/lib/cassandra (DSE data volume) to the /dse/data directory on the Docker host to ensure that the /data, /commit_logs, and /saved_caches directories will be available.

docker run -e DS_LICENSE=accept --name my-dse -v /dse/data:/var/lib/cassandra

Hosting the /var/lib/cassandra directory outside the container with the -v option allows the Docker container to be deleted and recreated without losing data.

The following sections list the exposed volumes.

DataStax Enterprise (DSE)

Directory Description


Database data


DSE Analytics with Spark data


DSEFS data


Database logs


Spark logs


Custom configuration files


Directory Description


DataStax Studio data

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000,