You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrate data from a previous version of InfluxDB to a more recent version while specifying precision
What I did
I'm migrating data from InfluxDB 1.8 to InfluxDB 2.4.
I know that all data in a specific database in InfluxDB 1.8 was written with second precision.
I exported the data from InfluxDB 1.8 using influx_inspect export.
The time is exported with nanosecond precision,
I compressed the data using --compress to reduce filesize.
I imported the data successfully in InfluxDB 2.4 with nanosecond precision using influx write.
I get an error if I try to import the data with second precision. If I add --precision s, I get the output : unable to parse '<my query> 1661386584000000000': time outside range -9223372036854775806 - 9223372036854775806
Suggestions
Export : Add a flag to set export precision
Import : Modify influx write to truncate the time if --precision other than ns is set.
Known issues
If data is exported with a lower precision than what the data was initially written with, there might be duplicate lines with the same time in the export file.
If data is imported with a lower precision than is contained in the export file, there might be duplicate lines with the same time. Data might be overwritten in InfluxDB.
Both of these are not a problem because setting the flag is a decision by the developer.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Goal
Migrate data from a previous version of InfluxDB to a more recent version while specifying precision
What I did
I'm migrating data from InfluxDB 1.8 to InfluxDB 2.4.
I know that all data in a specific database in InfluxDB 1.8 was written with
secondprecision.I exported the data from InfluxDB 1.8 using
influx_inspect export.The time is exported with
nanosecondprecision,I compressed the data using
--compressto reduce filesize.I imported the data successfully in InfluxDB 2.4 with
nanosecondprecision usinginflux write.I get an error if I try to import the data with
secondprecision. If I add--precision s, I get the output :unable to parse '<my query> 1661386584000000000': time outside range -9223372036854775806 - 9223372036854775806Suggestions
influx writeto truncate the time if--precisionother thannsis set.Known issues
Both of these are not a problem because setting the flag is a decision by the developer.
Related documentation
https://docs.influxdata.com/influxdb/v1.8/tools/influx_inspect/#export
https://docs.influxdata.com/influxdb/v2.4/reference/cli/influxd/inspect/export-lp/
Beta Was this translation helpful? Give feedback.
All reactions