1# `influx_inspect` 2 3## Ways to run 4 5### `influx_inspect` 6Will print usage for the tool. 7 8### `influx_inspect report` 9Displays series meta-data for all shards. Default location [$HOME/.influxdb] 10 11### `influx_inspect dumptsm` 12Dumps low-level details about tsm1 files 13 14#### Flags 15 16##### `-index` bool 17Dump raw index data. 18 19`default` = false 20 21#### `-blocks` bool 22Dump raw block data. 23 24`default` = false 25 26#### `-all` 27Dump all data. Caution: This may print a lot of information. 28 29`default` = false 30 31#### `-filter-key` 32Only display index and block data match this key substring. 33 34`default` = "" 35 36 37### `influx_inspect export` 38Exports all tsm files to line protocol. This output file can be imported via the [influx](https://github.com/influxdata/influxdb/tree/master/importer#running-the-import-command) command. 39 40 41#### `-datadir` string 42Data storage path. 43 44`default` = "$HOME/.influxdb/data" 45 46#### `-waldir` string 47WAL storage path. 48 49`default` = "$HOME/.influxdb/wal" 50 51#### `-out` string 52Destination file to export to 53 54`default` = "$HOME/.influxdb/export" 55 56#### `-database` string (optional) 57Database to export. 58 59`default` = "" 60 61#### `-retention` string (optional) 62Retention policy to export. 63 64`default` = "" 65 66#### `-start` string (optional) 67Optional. The time range to start at. 68 69#### `-end` string (optional) 70Optional. The time range to end at. 71 72#### `-compress` bool (optional) 73Compress the output. 74 75`default` = false 76 77#### Sample Commands 78 79Export entire database and compress output: 80``` 81influx_inspect export --compress 82``` 83 84Export specific retention policy: 85``` 86influx_inspect export --database mydb --retention autogen 87``` 88 89##### Sample Data 90This is a sample of what the output will look like. 91 92``` 93# DDL 94CREATE DATABASE MY_DB_NAME 95CREATE RETENTION POLICY autogen ON MY_DB_NAME DURATION inf REPLICATION 1 96 97# DML 98# CONTEXT-DATABASE:MY_DB_NAME 99# CONTEXT-RETENTION-POLICY:autogen 100randset value=97.9296104805 1439856000000000000 101randset value=25.3849066842 1439856100000000000 102``` 103 104# Caveats 105 106The 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. 107End users may want to change this prior to re-importing if they are importing to a cluster or want a different duration for retention. 108