-
Hello, Sorry if this question has already been asked. I recently upgraded from version 1.30.0 to version 1.32.0. I made a backup of the database using this documentation, via the command I have a 60mb teslamate.bck file that seems to contain all the data. I deleted the stack containing teslamate and recreated a new stack from scratch. I now have a teslamate instance in 1.32.0 with a postgreSQL database version 17. The problem is that when I try to restore the data... nothing happens.
When I look in Grafana, I have no data. And when I look at the database logs, I have error messages related to SQL syntax errors but in queries that are not in my .bck. For example : There is no such select in my file, just I tried to execute the SQL queries directly in the database. I don't know what to do anymore. :( |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
What was the old Postgres version? What you may need to do is stop all containers, delete the "new" database volume that is not working. Then start only the database container. Then try the restore command here: https://docs.teslamate.org/docs/maintenance/backup_restore If that does not work, you may have to get into the Docker database container (something like https://stackoverflow.com/questions/30172605/how-do-i-get-into-a-docker-containers-shell), then use chatgpt or something similar to help you format the commands correctly. You will probably have copy the backup file into the container. Then you can see whatever error messages show up during import. I was on Postgres 13 for a long time before upgrading to Postgres 15, and it was not straightforward. |
Beta Was this translation helpful? Give feedback.
-
My limited experience was that plain sql files don't work so well when changing psql versions. e.g. not tested.
Wonder if we need to update the docs. |
Beta Was this translation helpful? Give feedback.
I think I found the problem.
Unable to import the data via the command lines, I modified the dump to change the
copy
toinsert into
(using a custom script), and modified the function declarations to remove the ; afterEND
.By exemple :
And I tried to connect to the database from outside.
The tool I used (heidiSQL) did not show me all the databases (the tool seems compatible more with mySQL databases than postgreSQL.).
I only saw the "postgres" base and not "tesla…