influxDB时序数据库的备份与导入(linux)


备份命令:
influx backup --bucket [bucket_name] [path] --host [http://ip:port] -- token [token]
例子:
 influx backup --bucket  test /data/influxdb_back/ --host http://localhost:8086 --token  sSXAGkE4BJtVZrASaraetayXGFAWaewSARQTatthZ7eRp1VCUUUkgozdhlD9u8IrjUMIt1ojmn-JYtDtJAJvmQ==

备份好的数据文件

恢复命令
influx restore --bucket [备份的bucket_name]  --new-bucket [恢复到的bucket_name] [path] --host [http://ip:port] -- token [token]
例子:
influx restore --bucket test --new-bucket new_test/data/influxdb_back/ --host http://localhost:8088 --token sSXAGkE4BJtVZrASaraetayXGFAWaewSARQTatthZ7eRp1VCUUUkgozdhlD9u8IrjUMIt1ojmn-JYtDtJAJvmQ==