Linux

Where Does CrateDB Store Data?

CrateDB keeps table shards in var lib crate and settings in etc crate. Logs record shard recovery events.

Last updated

CrateDB stores distributed table shards under /var/lib/crate by default. Config in /etc/crate/crate.yml sets cluster name, paths, and discovery. That file decides where shards actually land.

Logs in /var/log/crate record shard allocation and recovery. For backup, snapshots beat file copies on multi node clusters. Single node moves can copy the data dir with the service stopped. Record the cluster name and node count with the backup, since restores expect the same topology to rejoin cleanly. Watch shard allocation after restart, since under replicated tables stay yellow until copies finish.

Where CrateDB stores this, by platform

Linux
/var/lib/crate

Shard and cluster state. Stop the node for consistent copies. Prefer snapshots for clusters with more than one node.

Linux
/etc/crate/crate.yml

Cluster, path, and discovery settings. Back up on every node. Keep cluster names matched during restore.

Frequently asked questions

how do i back up cratedb

Snapshot to S3 or a shared path with CREATE SNAPSHOT. File copies need all nodes stopped. Keep crate.yml with the snapshot metadata for restore. Verify snapshot completion in sys.snapshots before cleanup.

where is the cratedb data path

Shard data and cluster state live there by default. Custom path.data in crate.yml overrides it. Check the config before assuming the default path. Restart the node after path edits and watch allocation.

Notice an outdated path? Let us know.