Expaso/hassos-addon-timescaledb

Backup Add-on gives errors on restore

Closed this issue · 3 comments

Hi,

Im using the Add-on Home Assistant Backup Google Drive
https://github.com/sabeechen/hassio-google-drive-backup

But when I want restore the Add-on TimescaleDB I get this error when I want start it:

2021-10-14 08:06:14.880 UTC [409] FATAL: database files are incompatible with server
2021-10-14 08:06:14.880 UTC [409] DETAIL: The database cluster was initialized without USE_FLOAT8_BYVAL but the server was compiled with USE_FLOAT8_BYVAL.
2021-10-14 08:06:14.880 UTC [409] HINT: It looks like you need to recompile or initdb.
2021-10-14 08:06:14.880 UTC [409] LOG: database system is shut down

Hi @poudenes, we already discussed this error on the HA forum.

Final solution seems to be: use pg_dump / pg_restore to backup or restore the database, so the backup is transactionally consistent.

can we have a link to the thread? I want to migrate my db to another host, i am hoping for a short tutorial on how to do it properly.

Yes please! Would really like to have the link as well!!
I have a similar problem after restoring the add-on from a backup :/

2023-09-08 20:09:57.731 UTC [246] LOG:  database system was interrupted; last known up at 2023-09-08 10:40:09 UTC
2023-09-08 20:09:58.682 UTC [249] FATAL:  the database system is starting up
2023-09-08 20:09:58.683 UTC [251] FATAL:  the database system is starting up
2023-09-08 20:09:58.737 UTC [246] LOG:  invalid primary checkpoint record
2023-09-08 20:09:58.737 UTC [246] PANIC:  could not locate a valid checkpoint record
2023-09-08 20:09:58.947 UTC [235] LOG:  startup process (PID 246) was terminated by signal 6: Aborted
2023-09-08 20:09:58.947 UTC [235] LOG:  aborting startup due to startup process failure
2023-09-08 20:09:58.947 UTC [235] LOG:  database system is shut down

Doing a new partial backup of the old machine add-on with the add-on stoped right now and hope it will work better. But it takes about 4h to backup and about 8h to restore on the new machine :/

If I can't rely on HA backups for my db I don't know what to do...