So I tried every version of 2022.6 and the result is always the same… HA starts up fine, I get a notification saying “database upgrade in progress” and everything, including the recorder/history works fine (events are being logged).
After 5min or so, i get another notification saying “The database migration failed” and it completely stops working.
I use MariaDB (version 10.3.29) on a Synology NAS, which has worked flawlessly for many months and updates. This is my config:
recorder:
db_url: mysql://hass:pass@ip:port/hass?charset:utf8mb4
purge_keep_days: 1000
auto_purge: true
commit_interval: 10
### also lots of excludes
Could 1000 days be too much?! I really don’t want to lose any of that precious data! (anyway there’s probably not even 150 days worth of data right now)
I have absolutely no idea where to start trying to fix this - I looked at similar problems in the Forums, but all of them seem to be resolved by making an update or trying the update again … like I said, I tried every 2022.6.x Update there is and had to roll back to continue using HA
Additional info:
I run HA on an Odroid N2+
My Synology NAS is really old (DS411)
everything connected by wire
Mainly I would like to track my energy consumption/production, some of my temperature/humidity and a couple of other sensors and also the location of my portable devices and my car, endlessly. I want to be able to compare sensor values over the years and be able to exactly know where I was on specific days, way in the past (without sharing my location data with and relying on Google or Apple)
Energy has that feature already and I’m happy with it even though I would definitely appreciate a higher resolution of the data - for everything else, unfortunately we have to use purge_days on the whole recorder…
I wish there was a way to collect long term data for only a couple of entities (like exclude them from purge_days)
Storage would be no issue for me - there’s still lot of available TBs the recorder can use
Hmmm…sorry, I’m not an Influxdb expert. I only use it experimentally and haven’t really used it that much but it seems to be working for me the little bit that I have used it.
Do you really want that data in the live HA database, forever? I don’t save as much as you, but I find it’s easier to have it off-line where I can massage and analyze it using a variety of different tools.
There’s an old thread on this topic here. I posted some simple examples starting at post #68.
not necessarily - it just appears very convenient to have it all in one place and being able to check values against each other in the history tab for example.
I just don’t quite understand what the problem is with a large database - MariaDB should easily be able to handle this - it’s the reason people use it in the first place, isn’t it?! … it must be a hardware bottleneck somewhere (I say this without any actual knowledge of how it works - just what I gathered from videos and posts about that topic - some say they never purge and have collected hundreds of GB of data over the time)
I’ve worked on some very large databases. But they require some level of maintenance, and of course must be designed to be efficient at their specific task. The HA database structure has been greatly improved lately, and I hear even better things are coming. But it is designed to be a “live” system, always collecting a stream of data. I would not expect or even want it to be a long-term archival system.
As for convenience, I guess that’s a personal preference. I like to have my archival data somewhere I can play with it, without impacting the live system.
yeah - that’s a good point - (at least I) can only use the HA database within HA - which has a nice UI but I haven’t found a decent way to export data from specific entites and a specific time to play around with outside HA…
I’m already trying to reproduce what you did in the thread you linked earlier - had no Idea that was possible, and might be a decent workaround