hassio-addons / addon-unifi

UniFi Network Application - Home Assistant Community Add-ons
https://addons.community
MIT License
279 stars 138 forks source link

Patch from 0.23.2 to 1.1.0 "Database migration in progress..." #316

Closed Bob321da closed 3 years ago

Bob321da commented 3 years ago

Hello,

System: Home Assistant OS 6.6 (aarch64 / raspberrypi4-64) Home Assistant Core: 2021.11.5 Home Assistant Supervisor: 2021.10.8

I try to update the controller from 0.23.2 to 1.1.0 . As the update to 1.0.0 was not working cause of not reachable controller website I hoped that this is fixed with 1.1.0.

To my suprise after the update the website of the controller seems working cause i was asked about the new certificate of the website, but at the end I just got the following message: "Database Migration in progress..." and nothing more happens. I waited 2 hours, but nothing.

The log of the addon is good and it says that everything is started and running

Does anybody have a clue what is wrong here or how to fix that?

Thank you in advance

tommics commented 3 years ago

same issue here

AlecRust commented 3 years ago

FWIW the only way I could upgrade from 0.x to 1.x of this add-on was with a clean slate:

  1. Create backup of your network config, within UniFi settings
  2. Create backup of your UniFi addon settings (if any custom modification)
  3. Create backup of the UniFi addon itself i.e. call the HA backup service
  4. Delete UniFi addon running 0.x
  5. Install UniFi addon running latest 1.x
  6. Restore UniFi addon settings from backup if any (probably none)
  7. Restore UniFi network config within UniFi settings

I did this when migrating from 32bit Home Assistant installation to 64bit. 64bit is now required for this add-on.

Bob321da commented 3 years ago

Hi @AlecRust thank you for your help. So to sum up that I understand correctly: I can just make a backup of the controller config in the controller -> delete the old addon (0.23.2) -> install new addon (1.1.0) -> start up controller and import the config backup of the old controller?

I will try this evening ;)

AlecRust commented 3 years ago

@Bob321da that is correct. A while back but pretty sure that's what I did. Verify there is an export/import function in your UniFi settings, and of course restore the 0.23.2 add-on backup if it doesn't work.

Bob321da commented 3 years ago

Couldn't wait till evening. Did it right now and it went through! Totally smoth and awesomely perfect! @AlecRust thank you for your quick and "nail to the head" support.