0

I am trying to find a way to move my data from single node standalone clickhouse to new replicated cluster. But there are no solid documents available to perform that.

I tried to take backup from single node clickhouse and then tired to restore it into replicated cluster after modifying the metadata and all but these things didn't worked

  • Try to follow the methods described in the [Converting MergeTree to Replicated](https://kb.altinity.com/altinity-kb-setup-and-maintenance/altinity-kb-converting-mergetree-to-replicated/). Please, edit your question with the exact steps you tried and exact problem / error you got. – Mark Barinstein Jul 17 '23 at 12:30

2 Answers2

0

Use INSERT INTO new_db.new_table SELECT * FROM remote('addresses_expr', old_db, old_table[, 'old_user'[, 'old_password']]). It will insert results of the select query from remote old clickhouse into your new clickhouse.

In order to do replication, don't forget to use ReplicatedMergeTree

techkuz
  • 3,608
  • 5
  • 34
  • 62
0

You can have the currnet node join the new cluster and just INSERT (replicated/sharded table) SELECT (local table)

danthegoodman
  • 501
  • 4
  • 10