Lost 1 hour of data in Energy Dashboard every day when HA backup

Hello,

this is my energy dashboard :

As you can see there is no record at 1:00AM when i backup HA, is there any solution to solved this please?

Perhaps its a normal situation because Maria-DB is previously stop by the AddOn “Home Assistant Google Drive Backup” https://github.com/sabeechen/hassio-google-drive-backup

I ask to be sure there is no solution. Thanks

The solution is to not stop MariaDB.

Thanks @tom_l ok right but its automaticaly done by this addon right?

I don’t use Google Drive backup. You need to check its options.

ok thanks. But i make a mistake, the backup with this addon is at 2:00 AM…so there is something more problematic than this add On…

i check my automations and i have nothing at 1:00 am…

@tom_l do you think if i stop maria-db at 2:00, that mean i lost the energy dashboard 1 hour before?

I dont see any other action on my DB.

:man_shrugging:

Try not doing it and see.

1 Like

yes, i try thanks

I use the Google Drive backup, it has an option to stop any add-on when backing up including MariaDB (which I do). I don’t lose any data from the energy dashboard, so Tom’s suggestion is probably the solution.

1 Like

thanks @zoogara

you dont check anything or MariaDb is checked?

For me MariaDB is checked by default.

i have unchecked i will see tomorow if it works

MariaDB is checked. I did that a while ago under advice from someone and it has worked ever since. Can’t even remember the reason, but I think it was something to do with DB restores being corrupt if you didn’t stop it.

Is the data really lost or just showing up under the 02:00 bucket?
There could be cases that if the energy device can’t report back in time, the total ends up being used under the next bucket (02:00 in this case). This could happen if you have router/Wi-Fi resets as well.

thanks @eftimg

you re right, seems energy dashboard is not lost but display the x2 consumption, so he add the 1:00 am consumption + the 2:00 am.

i have uncheck in google backup addon and all is good now.

the problem is when i will restore a backup i ll probably have troublevwith maria db, that why the developper checked by default the option ti stop mariadb before backup…

You miss 2:00 time when bucket from 1:00-1:59:59 is written. That is why your 2:00-2:59:59 shows double.
That is exact reason why I do not do anything around midnight - not to mess statistics.
Just schedule your backup between hours - 2:10 would do.

1 Like

@stomko seems logic! thanks

i try tonight and report tomorow

i have check again to stop the Maria-Db AddOn in Google Backup AddOn and manualy make a backup in Google Backup AddOn at 3:15 PM and nothing is lost, so far so good…thanks @stomko thats the solution!