influxdb/cmd/influx_inspect
davidby-influx 144aca1f7f
fix: support absolute file paths in check-schema (#23991)
Absolute file paths in influx_inspect check-schema
cause an 'Invalid Argument' error. This was caused
fs.WalkDir using fs.ValidPath. Replacing with
filepath.WalkDir permits absolute paths.

closes https://github.com/influxdata/influxdb/issues/23987
2022-12-19 12:59:56 -08:00
..
buildtsi build: upgrade to go1.18 (#23250) 2022-03-31 16:17:57 -05:00
cardinality feat: estimate Cloud2 cardinality on 1.X databases (#23351) 2022-05-26 11:27:17 -07:00
deletetsm build: upgrade to go1.18 (#23250) 2022-03-31 16:17:57 -05:00
dumptsi build: upgrade to go1.18 (#23250) 2022-03-31 16:17:57 -05:00
dumptsm build: upgrade to go1.18 (#23250) 2022-03-31 16:17:57 -05:00
dumptsmwal dumptsmwal: fix minor vet error 2018-05-18 18:21:19 -06:00
export fix: don't write skipped shard messages to the line protocol output destination (#23727) (#23885) 2022-11-09 09:58:45 -08:00
help feat: add type conflict checker to influx_inspect (#23616) 2022-08-10 09:36:58 -07:00
report feat: estimate Cloud2 cardinality on 1.X databases (#23351) 2022-05-26 11:27:17 -07:00
reportdisk chore: Fix spaces 2021-01-29 13:20:36 -05:00
reporttsi Address PR feedback 2018-07-04 10:57:40 +01:00
type_conflicts fix: support absolute file paths in check-schema (#23991) 2022-12-19 12:59:56 -08:00
verify fix: remove data directory appending for influx_inspect verify (#23336) 2022-05-13 18:58:44 -06:00
README.md Update example in influx_inspect README.md 2016-11-01 10:16:23 -07:00
main.go feat: add type conflict checker to influx_inspect (#23616) 2022-08-10 09:36:58 -07:00

README.md

influx_inspect

Ways to run

influx_inspect

Will print usage for the tool.

influx_inspect report

Displays series meta-data for all shards. Default location [$HOME/.influxdb]

influx_inspect dumptsm

Dumps low-level details about tsm1 files

Flags

-index bool

Dump raw index data.

default = false

-blocks bool

Dump raw block data.

default = false

-all

Dump all data. Caution: This may print a lot of information.

default = false

-filter-key

Only display index and block data match this key substring.

default = ""

influx_inspect export

Exports all tsm files to line protocol. This output file can be imported via the influx command.

-datadir string

Data storage path.

default = "$HOME/.influxdb/data"

-waldir string

WAL storage path.

default = "$HOME/.influxdb/wal"

-out string

Destination 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)

Optional. The time range to start at.

-end string (optional)

Optional. The time range to end at.

-compress bool (optional)

Compress the output.

default = false

Sample Commands

Export entire database and compress output:

influx_inspect export --compress

Export specific retention policy:

influx_inspect export --database mydb --retention autogen
Sample Data

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

Caveats

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.