Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain how to upgrade from 2.11 to 4.0 - and make it less precious! #44

Open
mgg1010 opened this issue Mar 31, 2024 · 4 comments
Open

Comments

@mgg1010
Copy link

mgg1010 commented Mar 31, 2024

Hi

I tried upgrading from 2.11 to 4.0. It upgraded, then I got an error saying "can't upgrade postgres 14, please update first" - and then the add-in shut down!

I'm technical, but not a deep expert in HA - so I was lost. I found instructions saying to upgrade PG I needed to use pgadmin - but I couldn't because the addin shut down.

I've managed to downgrade back to 2.11, so my setup is working. But

  1. Can you give me a route to upgrade? Home Assistant doesn't support upgrading to 3.0, which might do it. I might be able
    to use portainer to do it, but any guidainces would be great

  2. A thought for the future: make it so the addin doesn't shut down so completely - or check for this condition sooner!

Thanks

Martin Green

@Expaso
Copy link
Owner

Expaso commented Apr 3, 2024

Hi Martin!

Wow! Upgrading from 2.11 is quite a step! Let me explain:

Within the addon, I had to manage not only upgrades of different timescale versions, but also different versions of Postgres.
This means that each addon contains 2 postgres versions: The 'previous major version', and the 'current version'.
Within a version you need to upgrade timescale first, and eventually postgres. So the addon has to run 2 postgres versions simultaneously during upgrades between major versions.
When I started the addon, we were on Postgres 12. Then came 14, then 15 and now 16.
This means that if I would make the upgrade possible from 12, I need to build-in Postgres 12,14,15 and 16. That would make the addon huge! (Apart form the fact that the base-image doesn't support all the older version anymore).

Unfortunately, I don't have any other means for checking earlier in the process or continue without quitting...
But.. maybe I could help with upgrading step by step..

Is it possible to connect on discord? https://discord.gg/ccBjsZC8
I could help you perform the upgrade in a few intermediate steps.

@Expaso
Copy link
Owner

Expaso commented Apr 12, 2024

Hi Martin, do you still need some assistance with this?

@JeppeBoetkjaer
Copy link

I al also facing an issue going from 2.0.1 to 4.0.1

i just updated core and os and wanted to update all add-ons.

after this update no history was found, my enery dashboard is gone(maybe not related).

But also I cannot log into the database.

Tried downgrading using the backup but still no luck. Its been years since I set this up also the reason for the huge jump in versions.

I could do with any assistance maybe over Discord?

@Expaso
Copy link
Owner

Expaso commented May 17, 2024

Hi @JeppeBoetkjaer , sure I can try helping you out... Discord invite: https://discord.gg/JktdYKhE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants