Export data from InfluxDB

前端 未结 7 1741
盖世英雄少女心
盖世英雄少女心 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:40

    From 1.5 onwards, the InfluxDB OSS backup utility provides a newer option which is much more convenient:

    -portable: Generates backup files in the newer InfluxDB Enterprise-compatible format. Highly recommended for all InfluxDB OSS users

    Export

    To back up everything:

    influxd backup -portable 
    

    To backup only the myperf database:

    influxd backup -portable -database myperf 
    

    Import

    To restore all databases found within the backup directory:

    influxd restore -portable 
    

    To restore only the myperf database (myperf database must not exist):

    influxd restore -portable -db myperf 
    

    Additional options include specifying timestamp , shard etc. See all the other supported options here.

提交回复
热议问题