sanderdw / hassio-addons

DSMR Reader Datalogger and Metabase Home Assistant Add-ons
https://community.home-assistant.io/search?q=%40sanderdw%20%23home-assistant-os
Other
54 stars 14 forks source link

Backup doesn't work anymore #36

Closed DavyRoswinkel closed 2 years ago

DavyRoswinkel commented 2 years ago

After updating TimescaleDB addon to version 2.0.0 I am having issues with making a backup.

The logfiles show:

pg_dump: error: server version: 14.2; pg_dump version: 13.6
pg_dump: error: aborting because of server version mismatch
2022-03-31 16:25:28,395 ERROR    schedule     execute_scheduled_processes      37 | (AttributeError) dsmr_backup.services.backup.run errored: 'NoneType' object has no attribute 'read'
127.0.0.1 - - [31/Mar/2022:16:25:28 +0200] "GET /about HTTP/1.1" 200 15456 "-" "curl/7.79.1" "-"
2022-03-31 16:25:28,522 CRITICAL backup       on_backup_failed                205 |  - Unexpected exit code (1) for backup: b'pg_dump: error: server version: 14.2; pg_dump version: 13.6\npg_dump: error: aborting because of server version mismatch\n'
2022-03-31 16:25:28,533 ERROR    schedule     execute_scheduled_processes      37 | (OSError) dsmr_backup.services.email.run errored: b'pg_dump: error: server version: 14.2; pg_dump version: 13.6\npg_dump: error: aborting because of server version mismatch\n'

Perhaps, the combination ( dsmrreader and timescaledb) makes dsmrreader needs an update also. ( or am I wrong?)

Also seeing errors in the timescaledb logfile ( made an issue at that repository also: https://github.com/Expaso/hassos-addon-timescaledb/issues/15#issue-1188157651) ( but that has to do with PostGIS, seems different)

Can someone please help me fix this backup issue?

Expaso commented 2 years ago

Hi @DavyRoswinkel ,

It looks like you need to upgrade pg_dump. The version of 13.6 is too low to backup PostgreSql 14:

pg_dump: error: server version: 14.2; pg_dump version: 13.6 pg_dump: error: aborting because of server version mismatch

Is it possible for you to upgrade?

DavyRoswinkel commented 2 years ago

Thanks for your reply.

I use the Home assistant OS and the addon.

I don't know how to upgrade. And if that is possible with the HA OS.

sanderdw commented 2 years ago

Yes it's due the underlying docker image wich is based on Alpine-3.13. In https://alpinelinux.org/posts/Alpine-3.15.0-released.html postgresql is updated to version 14. I will check with xirixiz to see if this is possible (https://github.com/xirixiz/dsmr-reader-docker)

sanderdw commented 2 years ago

Fixed in 1.1.1