Fixing lost data in influxdb (openhab2)

Hi, my hard drive filled up and temperature data logging to influxdb via openhab2 (mqtt) was stopped for a few days. I actually have the values stored in my syslog so I wanted to put them back in the database manually.

I understand there is a curl command to do this, but I am reluctant to play with it too much since I am scared of corrupting the database!

If a kind person would mind guiding me through this I would be very grateful.

To describe how it’s set up:

My database is called openhab_db, username admin, and is password protected.
If I use
SHOW MEASUREMENTS

I get
Room1Temp

If I use
SELECT * FROM Room1Temp WHERE time >= ‘2019-10-31T00:00:00Z’ and time < ‘2019-11-03T00:00:00Z’

I get
time value


1572480000324000000 22.11
1572480004461000000 22.13

etc.

Thank you!

Can you share what you have available in syslog that you’re trying to write to InfluxDB, please?

Sure, I have e.g.
Aug 22 23:56:37 Room1 EspEasy: BME280 : Temperature: 15.95
etc

Thanks for your help

https://docs.influxdata.com/influxdb/v1.7/guides/writing_data/

Hi, thanks, however I get an error saying ‘missing tag key’
What is the tag in this case when it’s just a simple field and value?

This is the command and response. Could someone help me with the error? Thanks

curl -i -XPOST ‘http://localhost:8086/write?db=openhab_db&u=admin&p=xxxxxx’ --data-binary ‘Room1Temp, value=22, 1572739197029000000’

HTTP/1.1 400 Bad Request
Content-Type: application/json
Request-Id: 5621ff65-17b9-11ea-a302-78e3b5980f57
X-Influxdb-Build: OSS
X-Influxdb-Error: unable to parse ‘Room1Temp, value=22, 1572739197029000000’: missing tag key
X-Influxdb-Version: 1.7.6
X-Request-Id: 5621ff65-17b9-11ea-a302-78e3b5980f57
Date: Thu, 05 Dec 2019 23:45:36 GMT
Content-Length: 93

{“error”:“unable to parse ‘Room1Temp, value=22, 1572739197029000000’ missing tag key”}

commas the problem, thanks anyway