Export data from InfluxDB

前端 未结 7 1739
盖世英雄少女心
盖世英雄少女心 2020-12-13 19:17

Is there a way (plugin or tool) to export the data from the database (or database itself) ? I\'m looking for this feature as I need to migrate a DB from present host to anot

7条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-13 19:27

    As ezotrank says, you can dump each table. There's a missing "-d" in ezotrank's answer though. It should be:

    curl "http://hosta:8086/db/dbname/series?u=root&p=root&q=select%20*%20from%20series_name%3B" > series_name.json
    curl -XPOST -d @series_name.json "http://hostb:8086/db/dbname/series?u=root&p=root"
    

    (Ezotrank, sorry, I would've just posted a comment directly on your answer, but I don't have enough reputation points to do that yet.)

提交回复
热议问题