MariaDB Addon in HassOS. How to force innodb_force_recovery mode?


read a lot, but can not find the way to to DB in innodb_force_recovery.
In PMA i can not change it because of

Is i understood right, in HassOS i hev no access to mysql cfg file.

So how it can be done?


You can’t. You can create a feature request requesting it be added to the addon’s configuration options. You’ll also need to explain what the option does, your use case and why you need it. Or create a PR adding that option here

Or if you just generally need more control over the database then the addon allows you should not use the addon. Deploy your own database server and connect HA to it. There’s nothing special about the addon, it’s just a mariadb container that’s mostly preconfigured to what ha users tend to need. If you have greater needs then the typical ha user, deploy your own server instead and configure it any way you need.

So it means in the HassOS that is “so good” i can not for example repair corruped DB or i understand it wrong?
Also interesting how can i deploy your own database on the server with HassOS. Could you give me a tipp?

Thanks a lot

Just to be clear, I have no idea what that option does, I have never used it. I kind of guessed it was about recovery from the name but I have never used it myself. I am not a DBA, I only know how addons work. The config file where I believe you would have to provide that option is here. But that won’t help because the only way to modify that is via the configuration options the addon provides.

That being said if it is used for fixing a corrupted database, couldn’t you just restore the addon from a backup to a time when it wasn’t corrupted? Or if you don’t have a backup then another option is to just uninstall and reinstall and start from a clean slate. If HA is the only thing putting data in the addon then the only data in there is history. Blowing everything away and starting over won’t break anything you’ll just reset history for all your entities.

As for deploying your own database, you would just set it up on a different server somewhere on your network. HA just asks for the access information for a database in recorder. There’s no requirement that it has to be an addon URL there, you can give it the URL of another device on your network.

You can’t deploy it on the same machine as HA though. If you are using HAOS then that’s a managed system so you can’t just add random containers to it. You’ll need a second machine. Or you’ll have to find a different DB addon or make your own with the options you need.