【问题标题】:Migrate clickhouse DB to new server将 clickhouse 数据库迁移到新服务器
【发布时间】:2021-05-31 15:46:42
【问题描述】:

我在 clickhouse 服务器上有一个数据库。我想将它迁移到新的 clickhouse 服务器。如何正确执行?我尝试使用 clickhouse-backup,但出现错误

2021/05/31 15:21:45  warn can't create table 'Data.Calls': <nil>, will try again
2021/05/31 15:21:45  warn can't create table 'Data.Fcst_1': <nil>, will try again
2021/05/31 15:21:45  warn can't create table 'Data.Fcst_3': <nil>, will try again
2021/05/31 15:21:45  warn can't create table 'Data.GAInfo': <nil>, will try again
2021/05/31 15:21:45  warn can't create table 'Data.HistoryLogs': <nil>, will try again
2021/05/31 15:21:45  warn can't create table 'Data.Info': <nil>, will try again
2021/05/31 15:21:45  warn can't create table 'Data.Info1': <nil>, will try again
2021/05/31 15:21:45  warn can't create table 'Data.Info15': <nil>, will try again
2021/05/31 15:21:45  warn can't create table 'Data.Info548': <nil>, will try again
2021/05/31 15:21:45  warn can't create table 'Data.Info60': <nil>, will try again
2021/05/31 15:21:45  warn can't create table 'Data.InfoAXPNew': <nil>, will try again
2021/05/31 15:21:45  warn can't create table 'Data.InfoAXPOld': <nil>, will try again
2021/05/31 15:21:45  warn can't create table 'Data.InfoPageView': <nil>, will try again

【问题讨论】:

  • 尝试最新版本的 clickhouse-backup
  • 你可以简单地 RSYNC /var/lib/clickhouse

标签: clickhouse


【解决方案1】:

这取决于新旧集群之间的连通性。

它存在(并且很好),您可以尝试remote 函数,这是最灵活的迁移方式。

我会进一步建议编写一个脚本,该脚本可以使用remote 函数读取表并在新集群上创建表,然后一次性插入数据或dailyweeklymonthly 迭代与@987654326 @。

如果您无法在新旧集群之间建立直接连接,您将不得不退回到传统的数据提取和上传方式。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-10-19
    • 2020-09-15
    • 1970-01-01
    • 2023-03-29
    相关资源
    最近更新 更多