The option to limit file size is very helpful for flexible storage media selection. For example, I try to save my backup to a WebDAV directory (Magenta). I keep having problems with the file size.
Don’t forget to vote for your own feature request! On desktop in the upper left hand area is the vote button with the vote counter, it is sitting at 0 1 right now.
Most backup options already allow you to exclude the db and other heavy users like media folders. You just need to use a partial backup instead of a full backup, then you’ll have control over what is actually stored.
Admittedly, my HA DB and my Influx DB are large. I’m not a database specialist. I haven’t yet found a practical way to keep the databases small. Picking apart the backup to get the file size under 2GB isn’t sustainable, because then in a few days or even weeks the backup will fail again due to the 2GB, and you’ll have to tinker with it all over again. You create the backup so that you can restore EVERYTHING in an emergency. It’s very time-consuming to then put all the pieces back together again. It would also be useful to have a tool for Home Assistant that allows even a database novice to monitor the growth of the HA DB and identify problems.
Those two statements are contradictory. I’ve been using HA for over 5 years and despite knowing some basic stuff about databases, I have never needed to mess around with Influx DB. Mainly because I know that a little knowledge can be a dangerous thing.
What exactly are you trying to accomplish here? Bear in mind that if you need long term storage, HA has this built in out of the box without needing Influxdb.
If you just want to backup your install without factoring in files which are subject to massive change (like db & media), use the partial backup I suggested earlier.
If you want to keep track of your db size, then the file size integration already handles that for you.
@ShadowFist - Thank you for your objection.
My HA has been running for over five years, too. It uses the SQLite database. However, sensor readings aren’t stored long-term (for years) (if so, how?). I mainly use it for heating and weather. I use InflusDB for that, and Grafana for the display.
The HA database is now 3.5 GB, how can I make it smaller?
I know with:
recorder:
purge_keep…
can you control this?
How do you find the “pig”- entities?
The most valuable thing HA has is the database
PS:
I just tried setting the “File size” but it doesn’t like the path “/homeassistant/home-assistant_v2.db” and “allowlist_external_dirs” doesn’t like the path “/homeassistant” either!
Read the link I posted to lts for a better explanation. Basically, if you can see data beyond your recorder purge_keep_days in your history, then it’s being stored in lts.
Most sensors (mainly those labelled as measurement) will keep lts data automatically. Not sure about weather, because most people don’t care about the weather 3 years ago. Again, read the link. You might be storing duplicate data unnecessarily