influxdb2.x 主从数据实时同步

1. Local创建remote-id

在Local命令行输入 如下命令

influx remote create 
  --name bandu_test_remote  // remote 名称
  --host http://127.0.0.1:8086 // 本地的influxdb 地址
  --org bandu  // 本地 org 名称
  --remote-url http://192.168.11.22:8086 // 远程 influxdb地址
  --remote-api-token SMLATecmB0DlNO // 远程 influxdb token
  --remote-org-id 8eaa43xxxxx62821 // 远程org 的id
命令输入后回车,会显示该 remote的id

2.创建同步策略-replication

在Local命令行输入 如下命令
influx replication create 
  --name bandu_test // replication 名称
  --org bandu  // 本地 org 名称
  --remote-id 0ba239fbfxxx3000   // 上一步创建的 remote-id
  --local-bucket-id 9ae5049xxxac8a01  // 本地 bucket-id
  --remote-bucket-id f3ba1e7ddexxxxc8 // 远程 bucket-id

3.测试效果

往 127.0.0.1:8086 实例的 bucket 写入数据,会实时同步数据到 192.168.11.22:8086 bucket 中

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值