Unable to create Teslamate backup #3374
Replies: 2 comments 1 reply
-
Hi there! For quick reference, doesn't matter which way I try to run the pg_dump, through docker compose or an interactive prompt (exec -it), gives the same result. Any suggestions ? |
Beta Was this translation helpful? Give feedback.
-
I just use the command in the documentation and it works fine. Your command line includes "postgres-database" - mine is just "database". Finally, I find that you have to run docker commands from the directory that the docker-compose.yml file is located otherwise things fail. |
Beta Was this translation helpful? Give feedback.
-
I recently messed up something in my docker compose configuration, which made the postgres database container recreate itself, in such a way, that the Teslamate database went empty. Did I have a backup? nope ... so I cried ...
But, life moves on and new data gets collected. But of course now, I don't want to end up in the same situation as before, for when I the next time let my butter fingers ruin a good docker compose config.
So I went to get create a Teslamate backup. But only to find this as the result:
docker compose exec -T postgres-database pg_dump -U teslamate teslamate > /root/teslamate.bck
WARN[0000] The "baX" variable is not set. Defaulting to a blank string.
pg_dump: error: query returned 0 rows instead of one: EXECUTE dumpBaseType('24686')
It doesn't exactly look promising and the bck file is of course equal to zero bytes.
(yes, the container for the postgres database is called postgres-database in my setup, as I had another container already called database doing something else. And no I am not renaming it, as that is what caused the afore mentioned crying incident)
Quick search on the postgres error gives results in the area of indexes gone bad and what have we. Not really something I would like to venture into.
The database now contains logging on a recent roadtrip through Europe, so not suuuuper keen on losing the content once again :-)
Any help is appreciated :-)
Beta Was this translation helpful? Give feedback.
All reactions