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 中