Best way to make a cluster migration.

1,595 views
Skip to first unread message

Jonatas Freitas

unread,
Jun 11, 2018, 2:01:54 PM6/11/18
to ClickHouse
Hi guys...

I have a task to migrate one ClickHouse Cluster, the structure is 2 Shards with 1 replica each.

What is the best way?

I have idea to add a new clustes nodes as replicas and after, remove old nodes, is a good idea?
Message has been deleted

Yj H

unread,
Jun 11, 2018, 9:19:36 PM6/11/18
to ClickHouse
The officially recommended way is clickhouse-copier. https://clickhouse.yandex/docs/en/utils/clickhouse-copier/

Jonatas Freitas

unread,
Jun 12, 2018, 8:43:08 AM6/12/18
to ClickHouse
Thx a lot!

Yj H

unread,
Jun 13, 2018, 1:20:03 AM6/13/18
to ClickHouse
welcome.
Moreover, the official document says migration by just copying the clickhouse directory is also feasible, when clickhouse server is down.

"
As an alternative, you can manually copy data from the /var/lib/clickhouse/data/database/table directory. But if you do this while the server is running, race conditions are possible when copying directories with files being added or changed, and the backup may be inconsistent. You can do this if the server isn't running – then the resulting data will be the same as after the ALTER TABLE t FREEZE PARTITION query.
Reply all
Reply to author
Forward
0 new messages