influx_inspect export


export

Exports all TSM files in Line Protocol data format. Writes all WAL file data for _internal/monitor. This output file can be imported using the influx command.

Syntax
influx_inspect export [ options ]
Options
Optional arguments are in brackets.

-datadir data_dir The path to the data directory. Default value is "$HOME/.influxdb/data".
[ -compress ] The flag to compress the output. Default value is false.  
[ -database db_name ] The name of the database to export. Default value is "".  
[ -end timestamp ] The timestamp for the end of the time range. The timestamp string must be in RFC3339 format.  
[ -out export_dir ] The location for the export file. Default value is "$HOME/.influxdb/export".  
[ -retention rp_name ] The name of the retention policy to export. Default value is "".  
[ -start timestamp ] The timestamp for the start of the time range. The timestamp string must be in RFC3339 format.  
[ -waldir wal_dir ] Path to the WAL directory. Default value is "$HOME/.influxdb/wal".

Examples
Export entire database and compress the output
influx_inspect export -compress
Export data from a specific database and retention policy
influx_inspect export -database mydb -retention autogen
Output file
# DDL
CREATE DATABASE MY_DB_NAME
CREATE RETENTION POLICY autogen ON MY_DB_NAME DURATION inf REPLICATION 1

# DML
# CONTEXT-DATABASE:MY_DB_NAME
# CONTEXT-RETENTION-POLICY:autogen
randset value=97.9296104805 1439856000000000000
randset value=25.3849066842 1439856100000000000