InfluxDB addon, how to get backuped data from old/separate InfluxDB into the HA InfluxDB container

Hi,

I’m still very new to HA, coming from openHAB, and loving it so far.

With my openHAB installation I had an InfluxDB with years of data. I would like to keep that data and move it over to my new HA system (on a new Raspberry Pi), into the InfluxDB that I installed as an official add-on to my HA setup. I am using the “Home Assistant Operating System”, so InfluxDB is, as far as I understood, an “internal” docker.

My question now is: I created a backup of the old database using the InfluxDB backup tool. I would like to import that database backup (which of course is not name “homeassistant” but rather “openhab_db”) into my HA InfluxDB. I am trying to figure out how to get those backup files into that HA InfluxDB container.

I have already installed Portainer as I think I might be able to get a console into the InfluxDB docker system and call the “influxd restore…” command from there, but I haven’t been able to figure out how to make the backup files available to the container.

I guess another way could be to create a second InfluxDB container on the Pi using Portainer? But if possible, I’d like to have all of the data in one InfluxDB.

Maybe someone can help.

Ok, I got it to work myself. I created the InfluxDB backup on the old system, copied the files to my /share/ folder, then used Portainer to open a shell to Home Assistants InfluxDB container, and in that shell I could see the files in /share, so I was able to use the influxd restore command successfully.

1 Like

Hi, can you please explain in detail the steps to access the influxdb console using Portainer? I need to export influxdb database from my influxdb HA addon.

You must follow these steps (Debugging the Home Assistant Operating System | Home Assistant Developer Docs). Then docker exec into the influxdb container.