Hass.io out of SD space 27GB in database / logs

My Hass.IO 0.72.1 Pi crashed and wouldn’t boot . I assumed the 32GB SanDisk Pro SD had failed after just 3 months. But on examining it I see that the log file is 13GB and the home-assistant_v2.db is nearly 14GB. I deleted the log file and now it will boot.

Obviously I can examine the log file and see what’s filling that (I haven’t enabled any logging options) and I’m using only a few release addins. What could cause the DB to grow so large and how can I recreate it back to a more normal size. I assume I can’t just delete it and it will rebuild ?

Do you have configured the recorder component?

No…I haven’t really added very much at all, maybe it would help though if I listed what I have configured later when I get home.

Re logging I have

default: debug

that doesn’t seem to be the default in a new config so I guess that has been changed by me and is now way too verbose.

That’s probably it,

Does that go into the DB file as well as the log file and if so how can I purge it ?


logger goes into log
recorder/history goes into DB

sure you have recorder disabled?

Can’t find recorder but looks like I might have history enabled. (which depends on recorder) but seems to store without it.

Is there a way to clear out the database from this historic data ?

This is my cofiguration of recorder, data older than 7 days will be deleted.

  purge_interval: 1
  purge_keep_days: 7

OK - I don’t have a recorder section , checked any include files too. So I’ll try creating one and see if that wipes the data. If not I’ll do a snapshot, go back to a ‘new’ install and then retrieve the snapshot.

Although it’s a hassle I’m kind of pleased with the reason/outcome as it makes me feel more confident in the stability of the setup.

Thanks for your help.


Log entries do go into the database so that probably explains why it is so big. You can just delete the home-assistant_v2.db file and restart, it will be recreated and purged automatically.

I’m experiencing the same problem. I deleted both files but when I ssh to my pi and run command df - h it still shows that I have 0 space left on the SD card. Not sure what is taking up all the additional space.