Skip to content

How to backup a sharded cluster? #1138

Closed Answered by Slach
FeryET asked this question in Q&A
Apr 19, 2025 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

I create a backup of the shard database on my first replica.

if you have multi shard you need to create backup on first replica in each shard

I detach the shard database and its replcias.

This is not required, and not described in link above

= ReplicatedSummingMergeTree('/clickhouse/tables/shard_1/table_1d

on the second shard it shall be /clickhouse/tables/shard_2/table_1d
if you restore backup from shard_1 into shard_2 then you will replicated data between shard

ReplicatedTable know nothing about shards, this is just watch zookeeper path read about zoo_path in documentation
https://clickhouse.com/docs/engines/table-engines/mergetree-family/replication#creating-replicated-tables

use…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@FeryET
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by FeryET
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants