Restore problem #2972
-
Hello, my Docker for Windows wouldn't start, so had to re-install but lost all my containers in the process. Created new Teslamate container and tried to run the restore, but get the following output. Nothing is restored, although backup file looks to be in order. Any suggestions please? C:\docker\teslamate>docker-compose exec -T database psql -U teslamate -d teslamate < teslamate.bck
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 11 replies
-
Did you run the requests detailed here? Stop the teslamate container to avoid write conflictsdocker-compose stop teslamate Drop existing data and reinitializedocker-compose exec -T database psql -U teslamate << . Restoredocker-compose exec -T database psql -U teslamate -d teslamate < teslamate.bck Restart the teslamate containerdocker-compose start teslamate |
Beta Was this translation helpful? Give feedback.
-
I'm having trouble running the "Drop existing data and reinitialize" command in the windows powershell, any advice?
…________________________________
From: Julien Cordeau ***@***.***>
Sent: Tuesday, 8 November 2022, 17:24
To: adriankumpf/teslamate ***@***.***>
Cc: pochacho99 ***@***.***>; Author ***@***.***>
Subject: Re: [adriankumpf/teslamate] Restore problem (Discussion #2972)
Did you run the requests detailed here<https://docs.teslamate.org/docs/maintenance/backup_restore>?
Stop the teslamate container to avoid write conflicts
docker-compose stop teslamate
Drop existing data and reinitialize
docker-compose exec -T database psql -U teslamate << .
drop schema public cascade;
create schema public;
create extension cube;
create extension earthdistance;
CREATE OR REPLACE FUNCTION public.ll_to_earth(float8, float8)
RETURNS public.earth
LANGUAGE SQL
IMMUTABLE STRICT
PARALLEL SAFE
AS 'SELECT public.cube(public.cube(public.cube(public.earth()*cos(radians($1))*cos(radians($2))),public.earth()*cos(radians($1))*sin(radians($2))),public.earth()*sin(radians($1)))::public.earth';
.
Restore
docker-compose exec -T database psql -U teslamate -d teslamate < teslamate.bck
Restart the teslamate container
docker-compose start teslamate
—
Reply to this email directly, view it on GitHub<#2972 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJPLBWPDA4PTBA6ZF4O4TOLWHIL5RANCNFSM6AAAAAAR2A7N4U>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Do you have TeslaMate installed via Docker? If so, the comments are the same regardless of host OS. You simply use terminal and execute the command. On Jul 23, 2025, at 5:27 PM, PoppyS33d ***@***.***> wrote:
In addition, I don't understand why this is even happening. I was just trying to restore my TeslaMate backup to a completely new system, and get all the errors listed above. There's no guidance on the GitHub for Mac users, it seems, on how to fix this, and it's way above my pay grade, unfortunately. I just do not know how to fix the issue.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
Did you run the requests detailed here?
Stop the teslamate container to avoid write conflicts
docker-compose stop teslamate
Drop existing data and reinitialize
docker-compose exec -T database psql -U teslamate << .
drop schema public cascade;
create schema public;
create extension cube;
create extension earthdistance;
CREATE OR REPLACE FUNCTION public.ll_to_earth(float8, float8)
RETURNS public.earth
LANGUAGE SQL
IMMUTABLE STRICT
PARALLEL SAFE
AS 'SELECT public.cube(public.cube(public.cube(public.earth()*cos(radians($1))*cos(radians($2))),public.earth()*cos(radians($1))*sin(radians($2))),public.earth()*sin(radians($1)))::public.earth';
.
Restore
docker-compose exec -T database psql -U tesl…