Influxdb: data on USB disk

Has anyone got a working config for putting the data files on a separate USB disk? I want them outsider of the container to avoid ruining my sd card.

1 Like

I just asked the same here - How to move influx.db to external disk when running hass.io on Pi? - sorry, did not mean to double post. Now linked.

1 Like

I ended up solving it by doing a stand-alone install and editing the influxdb.conf-file:

  dir = "/mnt/d5899f34-4cea-448a-88a1-e889e262208d/influxdb/meta"
  dir = "/mnt/d5899f34-4cea-448a-88a1-e889e262208d/influxdb/data"
  wal-dir = "/mnt/d5899f34-4cea-448a-88a1-e889e262208d/influxdb/wal"

/mnt/d5899f34-4cea-448a-88a1-e889e262208d/ is an external USB key.

1 Like

Two questions:

1.- Could you explain the ā€˜stand aloneā€™ installion?

2.- Would it be possible to copy influxdb data from an old installation in the SD to USB?

Best regards

1 Like

1: Iā€™m running the hass.io docker container on a Raspberry pi 3 in the dietpi OS. So instead of installing Influxdb from within hassio web GUI, I installed it on the Raspberry Pi. This will not work if you installed the hass.io image though.
2: Yes, thatā€™s what I did.

So - you find a workaround - by having a ā€œstandaloneā€ Linux underneath. Well done. What about other plugins - are you doing them the same way, or is it still possible to do enable these within Hass.io??

Anyway - Iā€™d still like to know if anybody has done it within the hass.io ā€œstandardā€ frameworkā€¦ I am not a developer, but I guess Iā€™d want a setting or configuration option on the Influx.db plugin - to point to a db. destination of choice.

Yes, add-ons can be run as usual from hass.io. Iā€™ve got Grafana and the IDE running also on the same machine.

Old thread, but Iā€™m picking it up.

Have there been any updates to this? Iā€™m new to Hass.io and I just realized that the db will be an issue over time. I got a plan to monitor temperatures inside and outside and compare to power consumption.

Would be great to know if itā€™s possible one way or another. I think that my last resort will be getting a NAS and run influx on that, since that is the only solution I found so far.

Influx on External Disk
Here somebody has achieved this :slight_smile: . He is running InfluxDB outside of Hassio and Graphana as Hassio add on.

Note that I wasnā€™t able to move just the data to an external disk while keeping the InfluxDB engine and config in the Hass . io addon.

Instead, I moved the entire InfluxDB installation to a separate docker container, not managed by Hass . io. This gave me the ability to do whatever I want with the data path. Grafana is still running as a Hass . io addon.

I was worried about the SD card in my RPi too. Best solution Iā€™ve found is to change the entire datadisk: Common Tasks - Operating System - Home Assistant

Perhaps a bit moreā€¦ drastic? than you may want, but definitely a valid option to store data on a separate external HDD without needing a separate server running docker or anything else.