$ influx_tsm -h
:<<DOC
Usage: influx_tsm [options] <data-path>
Convert a database from b1 or bz1 format to tsm1 format.
This tool will backup the directories before conversion (if not disabled).
The backed-up files must be removed manually, generally after starting up the
node again to make sure all of data has been converted correctly.
To restore a backup:
Shut down the node, remove the converted directory, and
copy the backed-up directory to the original location.
Options:
-backup="": The location to backup up the current databases. Must not be within the data directory.
-dbs="": Comma-delimited list of databases to convert. Default is to convert all databases.
-debug="": If set, http debugging endpoints will be enabled on the given address
-interval=5s: How often status updates are printed.
-nobackup=false: Disable database backups. Not recommended.
-parallel=false: Perform parallel conversion. (up to GOMAXPROCS shards at once)
-profile="": CPU Profile location
-sz=2147483648: Maximum size of individual TSM files.
-y=false: Don't ask, just convert
DOC
$ ls /var/lib/influxdb
data hh meta wal
$ mkdir /tmp/influxdb_backup
$ influx_tsm -backup /tmp/influxdb_backup /var/lib/influxdb/data
# If you wish to minimize the time conversion takes, enable parallel mode with -parallel:
$ influx_tsm -parallel=true -backup /tmp/influxdb_backup /var/lib/influxdb/data
:<<OUTPUT
2016/04/19 00:18:44.362167 Still Working: Completed Shards: 27/28 Points read/written: 4192583424/4192583424
2016/04/19 00:18:49.362387 Still Working: Completed Shards: 27/28 Points read/written: 4192625739/4192625739
2016/04/19 00:18:54.362674 Still Working: Completed Shards: 27/28 Points read/written: 4192700371/4192700371
2016/04/19 00:18:59.362906 Still Working: Completed Shards: 27/28 Points read/written: 4192806162/4192806162
2016/04/19 00:19:04.363121 Still Working: Completed Shards: 27/28 Points read/written: 4192911040/4192911040
2016/04/19 00:19:09.363313 Still Working: Completed Shards: 27/28 Points read/written: 4192911040/4192911040
2016/04/19 00:19:13.912142 Conversion of /data/data/icinga/default/136 successful (8h6m31.481348028s)
Summary statistics
========================================
Databases converted: 2
Shards converted: 28
TSM files created: 28
Points read: 4192911040
Points written: 4192911040
NaN filtered: 0
Inf filtered: 0
Points without fields filtered: 0
Disk usage pre-conversion (bytes): 118480699392
Disk usage post-conversion (bytes): 17643390726
Reduction factor: 85%
Bytes per TSM point: 4.21
Total conversion time: 13h56m43.515786407s
OUTPUT