2022.4: Groups! Groups! Groups!

Even with ~2000 entities? I guess I could simplify my maintenance if I can revert back to the regular DB.

I have honestly also started to think like-vice past month(Now that i got sqlite under control, good im not ā€œThe fastest snail in the forestā€ :slight_smile: , i can ā€œlean backā€ and enjoy the summer instead

1 Like

Even with 2K entities :wink:

1 Like

I cannot find the new backup feature, am I losing it? :laughing:

Well there is one reasonā€¦
I use the Google Drive Backup, and no matter how efficient the sqlite database is, itā€™s still going to result in backups over 1GB+ surely?
My backups right now are about 15MB.

+-----------------------+-----------+
| Table                 | Size (MB) |
+-----------------------+-----------+
| events                |    766.19 |
| states                |    449.16 |
| statistics            |    108.23 |
| statistics_short_term |     34.06 |
| statistics_runs       |      0.05 |
| statistics_meta       |      0.03 |
| recorder_runs         |      0.03 |
| schema_changes        |      0.02 |
+-----------------------+-----------+

Wow there has definitely been some improvements in recent releases, my MaiaDB used to be about 4GB.

I use Google Drive Backup too, and have both MariaDB and InfluxDB. My nightly backups are 1.1GB.

1 Like

My MySQL is not on the same machine, I am not using the MariaDB addon, I host the database on a different machine on the network.

1 Like

Right, using an external host I presume.

That can work in some cases, but it also means your backup isnā€™t complete (you took the DB out) :grinning_face_with_smiling_eyes:

No matter which Home Assistant supported database solution you can take the database out of the backup, E.g., by using MySQL or PostgreSQL externally (or an add-on), or by moving the SQLite database to a location that is out of reach for the backup process. All solutions will end up doing the same as you did (presumably).

That is unrelated to performance or handling of runtime performance :wink:
Saying your backup is faster or smaller is not completely true either, as the database is not part of the backup (or restore) either anymore.

In general, most people should just use the built-in SQLite database. It is tested extensively and its performance became really good (even better this release!)

4 Likes

Does backup not exist in HA Docker? That is the only thing I can think of as to why I cannot find it

While I donā€™t plan to move back yet (because if I lose the database in a catastrophic failure, that is not as important to me as losing Home Assistant - and thus things like being able to control my heating). The fact that the built in database, should be friendlier on SD Cards, means I should be able to take a copy of my my existing setup, run the beta on a Pi and restore my last backup to it, and then edit config to comment out the recorder - and I wonā€™t have a clash with 2 instances writing to the external database. This will make it much easier to be a beta tester - so this is excites me greatly. Thank you.

Do you use Tibber:Custom ?

Thanks! Awesome, missed that

Maybe it is just the example the team chose to use but you could already use a template to show which entity triggered an automation as per the following:

      - service: tts.google_say                           
        entity_id: media_player.google_speakers
        data:
          message: "{{ trigger.to_state.attributes.friendly_name }} appears to have been left open.

Does anyone have a better example of how variables could be used to good effect in automations?

So I decided to try and move a backup from my virtualbox HAOS to a docker install.

It seems in the docker version, there is indeed a backup, but no restore?

In HAOS, I just click on the backup and restore it. In the docker version there is no dialog?
I tried making a backup on the docker box and then copied my existing backup to the folder and restarted HA.

The backups show in the list, but they are not actionable.

The biggest reason I switched to Mariadb had to do with the Google drive backup add-on. It has the ability to stop the Mariadb prior to the backup making the chances of DB corruption much less. This was not available using the built in DB. Has this changed?

1 Like

Yes

2 Likes

I was also curious about this - thanks as always for the awesome work. super happy the new backup feature, just wondering if there are plans to expose the backup task within HA as a service or similar to enable automation for us container users? Happy to have a go or raise a feature request if not

1 Like

Looks like changing the timer restore option is missing on the UI (other than during the initial setup in the helpers page).

So glad this was brought in to core. Iā€™ve been using someone elseā€™s script for awhile, and itā€™s always great to be able to put something back to core functionality.

Where would I find this? It seems some of my entities are not being tracked at all and I do not see a place to enable long-term tracking.

But it was also pointed out by moderators and devs before that the DB used ny HA is not really suitable for long-term statistics.
Personally, I think it would be nice to see an automatic hand-over from internal DB to InfluxDB when reaching the default cut-off.

Right now HA does not really make it easy to see the necessary data.

1 Like

For a sensor to support long term statistics it must have a state_class. If the integration you are using does not support this you have to add it using customize, though it is preferable to contact the integration developer and get them to add it.