BasekickLabs

Line Protocol Bulk Import

Bulk-load InfluxDB Line Protocol files through POST /api/v1/import/lp, including gzip-compressed .lp and .txt files, with optional measurement filtering.

Import InfluxDB Line Protocol files into Arc. Enables one-command migration from InfluxDB by uploading .lp or .txt files (plain or gzip-compressed).

Available since v26.02.1

Line Protocol bulk import is available starting Arc v26.02.1 (February 2026).

Streaming vs. Bulk

This page covers bulk file import via POST /api/v1/import/lp. For streaming ingestion of Line Protocol data (real-time writes), see the Line Protocol write endpoints in the API Reference.

Endpoint

POST /api/v1/import/lp

Headers

HeaderRequiredDefaultDescription
AuthorizationYes-Bearer $ARC_TOKEN
X-Arc-DatabaseYes-Target database name (or use db query param)

Query parameters

ParameterRequiredDefaultDescription
measurementNo(all)Filter to a single measurement from the LP file
precisionNonsTimestamp precision: ns, us, ms, s

Basic example

curl -X POST "http://localhost:8000/api/v1/import/lp" \
  -H "Authorization: Bearer $ARC_TOKEN" \
  -H "X-Arc-Database: mydb" \
  -F "file=@export.lp"

Example with precision

# Import LP file with second-precision timestamps
curl -X POST "http://localhost:8000/api/v1/import/lp?precision=s" \
  -H "Authorization: Bearer $ARC_TOKEN" \
  -H "X-Arc-Database: mydb" \
  -F "file=@export_seconds.lp"

Response

{
  "status": "ok",
  "result": {
    "database": "mydb",
    "measurements": ["cpu", "mem", "disk"],
    "rows_imported": 150000,
    "precision": "ns",
    "duration_ms": 342
  }
}

InfluxDB migration

Export from InfluxDB and import directly into Arc. For InfluxDB 1.x, use influx_inspect export (the influx CLI does not support Line Protocol output):

# Export from InfluxDB 1.x (reads TSM and WAL directly)
influx_inspect export \
  -datadir /var/lib/influxdb/data \
  -waldir /var/lib/influxdb/wal \
  -database mydb -lponly -out export.lp

# Import to Arc
curl -X POST "http://localhost:8000/api/v1/import/lp" \
  -H "X-Arc-Database: mydb" \
  -H "Authorization: Bearer $ARC_TOKEN" \
  -F "file=@export.lp"

Multi-field measurements

influx_inspect export writes one Line Protocol line per field, so a multi-field point becomes several rows in Arc, each with one field populated. For multi-field measurements, use tsm2arc, which rejoins fields into a single point. See the full InfluxDB migration guide.

How it works

Data flows through Arc's high-performance columnar ingest pipeline (ArrowBuffer -> ArrowWriter -> Parquet -> storage) -- the same path used by streaming LP ingestion. This means bulk imports benefit from the same throughput, sort optimization, and hourly partitioning.

Notes

  • Multi-measurement -- a single LP file can contain multiple measurements; all are imported in one request.
  • Precision-aware -- timestamps are losslessly converted from the specified precision to Arc's internal microsecond format.
  • Gzip support -- compressed files (.lp.gz) are automatically detected and decompressed via magic bytes.
  • RBAC -- write permissions are checked for every measurement in the file.
  • Maximum file size: 500 MB (after decompression).

Error responses

StatusDescription
400Missing or invalid database, invalid precision, or no file uploaded; a database named after the Iceberg warehouse directory (Arc 27.01.1+, see Iceberg export); a column that mixes strings or booleans with numbers (a field, or a field and a tag of the same name); a line longer than 64 MB; a tag or field named time, _measurement or _database; two keys of one line that land in one column (a tag x, a field x, stored as x_value, and a field x_value)
403Insufficient write permissions for one or more measurements
413File exceeds 500 MB size limit (after decompression)
415The request has a Content-Encoding header (gzip the file itself instead)
500Import execution error. When the flush failed after every row was accepted, the rows may still be stored: check before running the file again. When it stopped after part of the file was written, the body has rows_written, written_measurements and stopped_at_measurement (when a write failed): running the whole file again writes those rows again.
503Refused before anything was written (for example the node is fenced, or the WAL volume is low). Retry after Retry-After.

On this page