Hi,
I got some long term history from an entity (pf_status) in InfluxDB v1, which got replaced with a new entity (cap_status).
I’d like to copy all the data from the old sensor to the new one. I only care about the data in Influx, not in HA itself. I am not really familiar with databases so I need some help.
The following query shows all the data which i want to copy:
USE “homeassistant”.“autogen”; SELECT “state” FROM “state” WHERE (“entity_id”::tag = ‘pf_status’)
So I tried:
USE “homeassistant”.“autogen”; SELECT * INTO cap_status FROM pf_status
It does say “Succes!”, but the old (test) data is still there, and none of the data from pf_status is copied.
Same with the following queries:
USE “homeassistant”.“autogen”; SELECT “state” INTO cap_status FROM pf_status WHERE (“entity_id”::tag = ‘pf_status’)
USE “homeassistant”.“autogen”; SELECT “state” INTO cap_status FROM pf_status WHERE time > -1200d AND (“entity_id”::tag = ‘pf_status’)"
At this point I’m just guessing, I tried all sort of things but nothing seem to work. Yes I do have a backup
Can anybody help me, what am I missing here? Thanks