Replies: 2 comments 1 reply
-
Hi! Another edit: This is untested, btw. Usually when starting containers in stacks (I only have experience with compose, but I suspect Portainer is the same) you can get some funky container names. When using $ docker exec teslamate_database_1 psql -U teslamate -d teslamate < teslamate.bck Should probably do the trick, if it doesn't try using EDIT: |
Beta Was this translation helpful? Give feedback.
-
(check your database name!) need time 10 GB about 15 min on fast server with nvme and xeon restart all services |
Beta Was this translation helpful? Give feedback.
-
Hello,
If I decide to deploy Teslamate via portainer and its stack editor, I don't know how to then restore a Teslamate backup.
As a matter of fact, I cannot use this:
`# 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`
since I did not use docker-compose.
Does anyone know how to drop data, reinitialize, and then restore if we did not use docker-compose to create Telamate?
Everything else works perfectly, and if I start again from scratch, put my file in a docker-compose.yml and then use docker-compose to create, drop, restore, it works.
I've tried using docker exec instead of docker-compose exec but can't seem to find the way.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions