Influx Inspect is a tool designed to view detailed information about on disk shards, as well as export data from a shard to line protocol that can be inserted back into the database.
influx_inspectWill print usage for the tool.
influx_inspect reportDisplays series meta-data for all shards. The default location is [$HOME/.influxdb].
influx_inspect dumptsmDumps low-level details about tsm files.
-index boolDump raw index data.
default = false
-blocks boolDump raw block data.
default = false
-allDump all data. Caution: This may print a lot of information.
default = false
-filter-keyOnly display index and block data that match this key substring.
default = “”
influx_inspect exportExports all tsm files to line protocol. This output file can be imported via the influx command.
-datadir stringData storage path.
default = “$HOME/.influxdb/data”
-waldir stringWAL storage path.
default = “$HOME/.influxdb/wal”
-out stringDestination file to export to
default = “$HOME/.influxdb/export”
-database string (optional)Database to export.
default = “”
-retention string (optional)Retention policy to export.
default = “”
-start string (optional)The start of the time range. The date-time string must be RFC3339 format.
-end string (optional)The end of the time range. The date-time string must be RFC3339 format.
-compress bool (optional)Compress the output.
default = false
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
This is a sample of what the output will look like.
# 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
Dumps low-level details about tsi1 files. dumptsi returns summary stats for each file if the command does not specify any flags.
influx_inspect dumptsi [<flags>] <path>
-seriesDump raw series data.
-measurementsDump raw measurement data.
-tag-keysDump raw tag keys.
-tag-valuesDump raw tag values.
-tag-value-seriesDump raw series for each tag value.
-measurement-filter
Filters data by measurement regular expression.
-tag-key-filter
Filters data by tag key regular expression.
-tag-value-filter
Filters data by tag value regular expression.
The system does not have access to the meta store when exporting TSM shards. As such, it always creates the retention policy with infinite duration and replication factor of 1. End users may want to change this prior to re-importing if they are importing to a cluster or want a different duration for retention.
© 2015 InfluxData, Inc.
Licensed under the MIT license.
https://docs.influxdata.com/influxdb/v1.3/tools/influx_inspect/