← 全部工具

Hendriksoft6783/influxdb2tsfile

热度 75 更新于 DevOps 与云

Migrate InfluxDB data to Apache TsFile with a command-line tool for seamless cloud retirement transition.

githubauto-collected

安装

暂未验证可直接使用的安装命令,请查看项目官方文档或 Release。

influxdb2tsfile

English · 中文

A command-line tool that migrates InfluxDB data to Apache TsFile.

Why it exists: Alibaba Cloud InfluxDB® is being retired — no new purchases after 2025-10-23, no renewals or scaling after 2026-04-23, and the service is terminated on 2026-10-23. This tool moves the historical data out of InfluxDB into columnar TsFile files, so it can keep living in TimechoDB, Apache IoTDB, or any TsFile reader.

Download

Prebuilt packages are on the Releases page:

| File | What it is | | --- | --- | | influxdb2tsfile-<version-bin.tar.gz | Runnable package: bin/influxdb2tsfile launcher + fat-jar in lib/ + READMEs + LICENSE | | influxdb2tsfile-<version.jar | The shaded fat-jar alone |

tar xzf influxdb2tsfile-1.0.0-bin.tar.gz && cd influxdb2tsfile-1.0.0
export JAVA_HOME=/path/to/jdk-17      # JDK 17+ is required
bin/influxdb2tsfile --help

Features

  • InfluxDB 1.x (InfluxQL, username/password) and InfluxDB 2.x (InfluxQL compatibility API, API token) — same commands and options for both
  • Offline migration from line protocol files or stdin (lp2tsfile), for instances that are already gone
  • Automatic schema mapping: measurement → table, tag → TAG column, field → FIELD column, with type mapping (float→DOUBLE, integer/unsigned→INT64, boolean→BOOLEAN, string→STRING)
  • Streaming read + sharded write: time slicing (--time-slice), rolling by size/rows (--max-file-size / --max-rows-per-file), predictable memory usage
  • Parallel export (--parallel): every work unit writes its own files, no shared state
  • Resumable (--resume): failed units are retried, completed units are skipped, no duplicated rows
  • Built-in verification: --verify and inspect --manifest read the written TsFile files back and compare row counts against the manifest
  • manifest.json per run: files, row counts, time ranges and column mapping per unit — handy for auditing and for downstream tooling
  • Single fat-jar, no external dependency besides the JRE

Requirements

| Item | Requirement | | --- | --- | | JDK | 17 or newer for build and runtime. TsFile 2.4.0 is compiled to Java 17 bytecode; older JDKs fail with UnsupportedClassVersionError / class file version 61.0 | | Maven | 3.6 or newer (build only) | | Apache TsFile | 2.4.0 (bundled in the fat-jar) |

The launcher script bin/influxdb2tsfile checks the JDK version up front and prints a clear message instead of an obscure UnsupportedClassVersionError.

Build

mvn -DskipTests package      # produces target/influxdb2tsfile-1.0.0.jar (dependencies included)
mvn test                     # unit + integration tests (uses an in-process mock InfluxDB, no real server needed)

Quick start

1. Inspect the schema and the TsFile mapping