跳至正文
  • 16 views
  • 1 min read

如何将influxdb1.8数据迁移到influx2.7

新浪微博 豆瓣 QQ 百度贴吧 QQ空间

将数据从influx1.8导出:

#influx_inspect export -datadir /var/lib/influxdb/data -waldir /var/lib/influxdb/wal -out ./export -lponly -database storage -retention autogen -compress

将导出的数据导入至influx2.x

#influx write --org cacco -b storage --compression gzip --file export --token xxxxxxxx

将导出的数据重新导入至influx1.x版本

#influx -username xxxxx -password xxxxx -host xxx.xxx.xxx.xxx -port 8086 -import -path /root/xxxxx.export.gz -compressed

发表回复