How long does Database upgrade take?

I recently updated to version 2022.2.3 of Home assistant from 2021.12.10 and received the notification below


Database upgrade in progress

System performance will temporarily degrade during the database upgrade. Do not power down or restart the system until the upgrade completes. Integrations that read the database, such as logbook and history, may return inconsistent results until the upgrade completes.

Last week

How long should this database upgrade take? Is there a way to check on the status of the database upgrade?

So far everything seems to be working but I don’t want to make any changes till the database upgrade is complete since I can’t restart

How big is your database and what hardware are you running on?

The worst case I’ve seen ( a massive 30 day db on a pi3) took 36 hours.

I’m running on a Raspberry Pi 4. I believe my database is 4.22 gig. I’m looking at home-assistant_v2.db in windows file explorer. on the samba share.

If you updated last week it’s definitely finished.

1 Like

Thanks Tom, Kind of what I thought but wanted to be sure. Wish there was some way to verify. I checked the logs and didn’t see a completion message

It will actually prevent and warn you if you attempt to restart during a database upgrade.

Also, maybe it was logged in the Supervisor log?

I wondered about that question as well. Saw that prompt for a brief second after the upgrade. A few hours a later I restarted HA having forgotten about the warning. Didn’t see a warning about database is in progress of upgrading though.

I noticed the lights turn on a tad slower after a motion has been detected with this version. Maybe it is in my head.

Hi
The issue is that there is no log message indicating that the DB update is completed.
This is a recurrent problem for users

It looks like there is, but it’s log level is INFO while the first message is a WARNING.

1 Like

Thanks a lot @ondras12345

my default log level is “warning” , so il will change it to “info”

logger:
  default: warning
  logs:
    homeassistant.components.mqtt: info
    homeassistant.components.shell_command: info

Then il will see these messages :

“Upgrading recorder db schema to version %s”
“Upgrade to version %s done”, new_version

It should probably be enough to just change it for homeassistant.components.recorder.migration.

logger:
  default: warning
  logs:
    homeassistant.components.mqtt: info
    homeassistant.components.shell_command: info
    homeassistant.components.recorder.migration: info
3 Likes

based on that info i must wait 1 week before restart :frowning:
; 400 Days Storage ; Rasberry 4;