influx 导入备份

一、背景

二、实现

模版

influx_inspect export -datadir "D:/WindowsService/Influxdb/data" -waldir "D:/WindowsService/Influxdb/wal" -out "D:/202311_lcq" -database 要导出的库 -start 2023-11-01T08:00:00Z -end 2023-11-02T08:00:00Z -compress

注意 这个时间格式 2023-11-01T08:00:00Z 是 会提早8个小时,所以2023-11-01T08:00:00Z 是 2023-11-01 00:00:00

导出

influx_inspect export -datadir "D:/WindowsService/Influxdb/data" -waldir "D:/WindowsService/Influxdb/wal" -out "D:/202311_lcq" -database water_purification_plant -start 2023-11-01T08:00:00Z -end 2023-11-02T08:00:00Z -compress

导入

influx -import -path=202201 -precision=ns

influxdb 连接远程

influx -database 'metrics' -host 'localhost' -port '8086' -username admin -password admin

三、遇到的报错

四、参考博客

posted @ 2023-12-15 15:31  林财钦  阅读(21)  评论(0编辑  收藏  举报