Where does Influx store db files in Hassio?

Can’t find the Influx database file, anyone know where to look? Hassio latest version.

dir = "/data/influxdb/data"

Not sure if /data/influxdb is mounted to a host directory or not, but I would imagine it would be in the root of the share on hassio.

I don’t have anything in the data directory related to influx. I can’t find the other files referenced above either. In fact running find in ssh for “Influxdb” returns no results. Phantom program :slight_smile:

/data/influxdb/data is located INSIDE the docker container running influx. Look under ‘addons’ in that directory.

1 Like

Now you have lost me, sorry newb here. But I am not running docker as far as I know? Standard Hassio install on Raspberry Pi, influx installed as add-on. If this is somehow now in a docker how do I log into it?

Hassio runs docker. Without docker, you wouldn’t have hassio.

Every add-on is a different docker container running alongside hassio.

What do you mean? You don’t “log into docker”. Core ssh add-on that you’re running is a docker container. You’re inside the ssh container when you connect to that.

Install the portainer add-on and you can see everything running.

1 Like

Ok thanks for your help. I finally got Portainer installed and can see:

So assuming all data is stored in the influx container its not that big (280MB).

Still don’t really understand how I would actually access the files but n/m, its not influx that’s filling up my disk.

Look at the volumes

When I check container ‘addon_a0d7b954_influxdb’ using portainer and inpect the mounts it states:

Destination /data
Mode rw
Propagation rprivate
RW true
Source /mnt/data/supervisor/addons/data/a0d7b954_influxdb
Type bind

So I think it’s stored in container: hassos_supervisor in directory:/data/addons/data.

I’m using hassio manually installed in Docker in raspbian buster lite and my InfluxDB database stored here:

/usr/share/hassio/addons/data/a0d7b954_influxdb

1 Like

Reviving old thread to help others with what I have discovered for those that are poking around in the dark as much as me looking for this (caveat, I am not a HA, InfluxDB or docker expert by any matter of means).

As others have said, InfluxDB is installed in a docker contrainer. Because of this,. as others have said, it does not appear to be accessible from the command line with SSH. Also has others have said, the way forward is to install Portainer.

  • From “Home” select the “Primary” environment.
  • Then Select “Images” - In there you should see an Image that has a InfluxDB reference and also a size. This is the size of the whole InfluxDB container.

As a side note, I was a bit surprised by how small this container is. 10 days of the recorder on my setup with LOTs of entities, including entities that are recording every second or so takes up about 8GB. About 5 months of this data in InfluxDB is only about 550MB!!! In fact the Grafana container is larger at 1.2GB which is ALL very surprising to me. This is despite InfluxDB size as recorded in InfluxDB being reported as 160GB (as outined in the sensor config for this as outlined here https://smarthomescene.com/guides/optimize-your-home-assistant-database/). I assume the answer is InfluxDB must have a VERY efficient file format and compression to make this all work. I know that the actual DB size on disk is NOT 160GB as my disk as only about 60% used and it is only a 64GB disk.

But for those of you who are more comfortable with Linux CLI to poke around and see the files and see more details of the file structure etc, it looks like you can connect to the container BASH CLI as follows :

  • Select “Containers”
  • Next to the InfluxDB container, there is a column of “Quick Actions”. If you hover over the >_ symbol, you will see that is an “Exec CLI”. Click on this and select connect.
  • From here, I can do du -sk * to see where the big files are. But all the InfluxDB files seem to be under /data/influxdb

I hope this is useful to someone.

1 Like

Hi. I would like to install infuxdb, but looking for a way to relocate the default folder locations to an external drive. I have HomeAssistant OS installed and can see the folder location via Portainer add-on. As it posssible to relocate those 3 folders to an external drive with my setup??

You can try it but I guess your motivation lies in storing that huge amount of data elsewhere, so they do not increase the filesize of your HA backup, am I right? I installed influxdb to the docker on my synology NAS yesterday and connected grafana addon to it with hopes to solve exactly this problem

so they do not increase the filesize of your HA backup, am I right?

exactly. I have tried, but never got it to work.

Here is the guide I used: Setting up InfluxDB and Grafana using Docker - Home Assistant (home-assistant.io)

Before you proceed, check the discussion below. At least the second post is important. After installation, the commands in the guide seems to be obsolete, I had to follow the following command to make it work:

docker run --ulimit nofile=66000:66000 \
  -d \
  --name docker-statsd-influxdb-grafana \
  -p 3003:3003 \
  -p 3004:8888 \
  -p 8086:8086 \
  -p 22022:22 \
  -p 8125:8125/udp \
  samuelebistoletti/docker-statsd-influxdb-grafana:latest

However, you might consider using different docker image. I am using only influx from the running container and connect my grafana as an addon in HA to it for many reasons. I do not understand the benefit to have grafana elsewhere, I did a lot of tweaking to make grafana working in iFrame on other devices with proxy configuration etc. on my server already and it does not use almost any space, so no reason to use the grafana in the container. Moreoever, the grafana in the container was kind of broken to me as I could not login with admin/admin, even though I reseted the pass using grafana CLI following many guides online, no success, then I realized that I actually do not even want to use it.

What is still a question to me is the container itself. I have never used docker as it was a bit blurry solution, but that’s probably my problem. So backing up the influxdb is now solely on my synology nas backup policy.

Let me know whether you were successful!

However, you might consider using different docker image. I am using only influx from the running container and connect my grafana as an addon in HA to it for many reasons.

Hey. Thanks for the link. Do you know of an alternative docker image with just influxdb? I may just try your route.