Line protocol import fails

I exported my whole database on machine 1 in a file using line protocol.

influx_inspect export -datadir "/var/lib/influxdb/data" -waldir "/var/lib/influxdb/wal" -out "openhab_db_export" -database openhab_db -retention autogen

Date and time on the first line are looking very odd. I would like to export all records in every measurement.

# INFLUXDB EXPORT: 1677-09-21T00:42:29+00:29 - 2262-04-12T00:47:16+01:00
# DDL
CREATE DATABASE openhab_db WITH NAME autogen
# DML
# CONTEXT-DATABASE:openhab_db
# CONTEXT-RETENTION-POLICY:autogen
# writing tsm data
TVOC value=11 1609257874049000000
TVOC value=10 1609257934045000000
TVOC value=10 1609257994046000000
TVOC value=9 1609258054053000000
TVOC value=14 1609258114043000000
TVOC value=13 1609258174047000000
TVOC value=13 1609258234047000000
TVOC value=12 1609258354047000000
TVOC value=13 1609258414049000000
TVOC value=13 1609258474080000000

I altered some values because I would like to import the database into machine 2 but with different table names (measurement).

# INFLUXDB EXPORT: 1677-09-21T00:42:29+00:29 - 2262-04-12T00:47:16+01:00
# DDL
CREATE DATABASE test
# DML
# CONTEXT-DATABASE:test
# CONTEXT-RETENTION-POLICY:autogen
# writing tsm data
TVOC_new value=11 1609257874049000000
TVOC_new value=10 1609257934045000000
TVOC_new value=10 1609257994046000000
TVOC_new value=9 1609258054053000000
TVOC_new value=14 1609258114043000000
TVOC_new value=13 1609258174047000000
TVOC_new value=13 1609258234047000000
TVOC_new value=12 1609258354047000000
TVOC_new value=13 1609258414049000000
TVOC_new value=13 1609258474080000000

If I’m trying to import these bunch of records on machine 2 I get the following error.

influx -import -path=./openhab_db_export_tvoc -precision=s -username 'username' -password 'password'
2021/08/18 11:18:41 error writing batch:  {"error":"unable to parse 'TVOC_new value=11 1609257874049000000': time outside range -9223372036854775806 - 9223372036854775806\nunable to parse 'TVOC_new value=10 1609257934045000000': time outside range -9223372036854775806 - 9223372036854775806\nunable to parse 'TVOC_new value=10 1609257994046000000': time outside range -9223372036854775806 - 9223372036854775806\nunable to parse 'TVOC_new value=9 1609258054053000000': time outside range -9223372036854775806 - 9223372036854775806\nunable to parse 'TVOC_new value=14 1609258114043000000': time outside range -9223372036854775806 - 9223372036854775806\nunable to parse 'TVOC_new value=13 1609258174047000000': time outside range -9223372036854775806 - 9223372036854775806\nunable to parse 'TVOC_new value=13 1609258234047000000': time outside range -9223372036854775806 - 9223372036854775806\nunable to parse 'TVOC_new value=12 1609258354047000000': time outside range -9223372036854775806 - 9223372036854775806\nunable to parse 'TVOC_new value=13 1609258414049000000': time outside range -9223372036854775806 - 9223372036854775806\nunable to parse 'TVOC_new value=13 1609258474080000000': time outside range -9223372036854775806 - 9223372036854775806"}

2021/08/18 11:18:41 TVOC_new value=11 1609257874049000000

TVOC_new value=10 1609257934045000000

TVOC_new value=10 1609257994046000000

TVOC_new value=9 1609258054053000000

TVOC_new value=14 1609258114043000000

TVOC_new value=13 1609258174047000000

TVOC_new value=13 1609258234047000000

TVOC_new value=12 1609258354047000000

TVOC_new value=13 1609258414049000000

TVOC_new value=13 1609258474080000000

ERROR: 10 points were not inserted

What am I doing wrong. Do I have to export it in RFC3339 format?

Thank you very much for your help

Greetings Manuel

@Manuel, exported timestamp seem to be in nanoseconds precision. So, try to set the same precision during import:
influx -import -path=./openhab_db_export_tvoc -precision=ns -username 'username' -password 'password'

Hello Vlasta
You’re my hero!

influx -import -path=./openhab_db_export_tvoc -precision=ns -username 'user' -password 'password'
2021/08/18 13:50:56 Processed 1 commands
2021/08/18 13:50:56 Processed 10 inserts
2021/08/18 13:50:56 Failed 0 inserts

Thank you very much for your help.

Greetings Manuel