Where Does ClickHouse Store Tables and Config?
ClickHouse table data, metadata, and server config paths for Debian package and Docker installs on Linux.
Last updated
ClickHouse separates binaries, data, and config cleanly. Table parts live under /var/lib/clickhouse/data with metadata in /var/lib/clickhouse/metadata beside it. Config lives in /etc/clickhouse-server with config.xml and users.d overrides.
Docker installs keep the same container paths behind named volumes. The host volume name gains a compose prefix, so inspect before scripting backups. Check the path line in config.xml on odd hosts. That setting relocates the whole data tree when changed. Keep versions matched for restores.
Where ClickHouse stores this, by platform
/var/lib/clickhouse/data
Default data root with data, metadata, and access subfolders. Stop the server before copying for consistent backups. This folder dominates disk usage on analytics hosts.
/etc/clickhouse-server/config.xml
Main server config plus users.d and config.d drop-ins. Holds paths, ports, and access rules. Keep with data backups for full restore.
Frequently asked questions
what do i back up for a ClickHouse move
Copy /var/lib/clickhouse with the config folder and users.d for same version restores. Table parts sit in data subfolders, metadata in metadata. Keep server versions matched or parts may refuse to attach.
where is ClickHouse data in Docker
Run docker volume ls to find the clickhouse data volume, then inspect its mountpoint. The container path stays /var/lib/clickhouse. Compose prefixes the volume name with the project folder.
Notice an outdated path? Let us know.