Comments (9)
Now I have another error:
root@docker:/bkp/docker/teslamate# docker compose exec -T database psql -U usr4tesla 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';
.
NOTICE: drop cascades to 2 other objects
DETAIL: drop cascades to extension cube
drop cascades to extension earthdistance
DROP SCHEMA
CREATE SCHEMA
CREATE EXTENSION
CREATE EXTENSION
**ERROR: function radians() does not exist**
LINE 6: ...c.cube(public.cube(public.cube(public.earth()*cos(radians())...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
Thanks again
Denis
from teslamate.
Hello,
thanks for reporting.
Please help us understand what your installation looks like and what you want to archive.
v1241
This Version does not exist.
Overall it looks for me that your try to restore following https://docs.teslamate.org/docs/maintenance/backup_restore#restore and do have copy paste issues.
from teslamate.
Sorry... I didn't know the version of TeslaMate
Now I see it... is 1.29.2.
Yes... I try to restore the DB from a server to another.
But I want to ask something... is there possibility to backup the docker and put it on another server ?
Like usually dockers can do...
Thanks again
Denis
from teslamate.
I want to ask another think please ...
Here it give me an error:
root@docker:/bkp/docker/teslamate# docker compose exec -T database psql -U usr4tesla teslamate << .
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';
.
ERROR: function radians() does not exist
LINE 6: ...c.cube(public.cube(public.cube(public.earth()*cos(radians())...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
But if I connect to pgsql and I send the \df command, I can see the "ll_to_earth" function.
So it was created even if it gave an error please ?
Thanks again
Denis
Thanks again
from teslamate.
is there possibility to backup the docker and put it on another server ?
Docker handles the volumes on its own. You can copy the volume, but when trying to use it on another machine it will fail. You can declare it as external, but this will break other things. Therefore, not recommended way in any project I am aware of.
I try to restore the DB from a server to another.
It is like
I would suggest you start with a clean system, to have a clear and defined state. You can run a docker volume ls
on new system to see the teslamate-db volume, then a docker compose down
to then let you delete the database volume with docker volume rm xyz
Then you can follow above instructions.
usr4tesla
Did you change the TM_DB_USER
from teslamate.
Thanks a lot for your help... but I finally understand why I had some errors...
I had the docker compose file compiled with postgres version 13... :-(
I put version 16 and remake all from the begining and now it's all ok.
The problem that I have now is that I can't import 2 month of data from Teslafi...
I do all the procedure and I run it from web... here is the log:
2024-07-03 22:47:59.295 [notice] SIGTERM received - shutting down
2024-07-03 22:47:59.295 [info] Shutting down 2 sockets in 1 rounds of 2000ms
waiting for postgres at 127.0.0.1:5432
[info] Found 2 file(s) at '/opt/app/import'. Starting in import mode!
2024-07-03 22:48:02.333 [info] Migrations already up
[info] Found 2 file(s) at '/opt/app/import'. Starting in import mode!
2024-07-03 22:48:03.563 [info] System Info: Erlang/OTP 26 (jit)
2024-07-03 22:48:03.563 [info] Version: 1.29.2
2024-07-03 22:48:04.188 [info] POST https://auth.tesla.com/oauth2/v3/token -> 200 (614.534 ms)
2024-07-03 22:48:04.188 [info] Refreshed api tokens
2024-07-03 22:48:04.200 [info] Scheduling token refresh in 6 h
2024-07-03 22:48:04.204 [info] Running TeslaMateWeb.Endpoint with cowboy 2.10.0 at :::4000 (http)
2024-07-03 22:48:04.204 [info] Access TeslaMateWeb.Endpoint at http://localhost
2024-07-03 22:48:04.396 [info] GET /
2024-07-03 22:48:04.397 [info] Sent 302 in 1ms
2024-07-03 22:48:04.400 [info] GET /import
2024-07-03 22:48:04.402 [info] Sent 200 in 1ms
2024-07-03 22:48:42.987 [info] Importing 2 file(s) ...
2024-07-03 22:48:42.990 [info] Starting logger for 'Tesa'
2024-07-03 22:48:43.092 [info] Import complete!
But when I connect to the pgsql and I made a select of data from that month I receive nothing:
teslamate=# select * from drives where start_date between '2024-04-01' and '2024-05-31' order by start_date;
id | start_date | end_date | outside_temp_avg | speed_max | power_max | power_min | start_ideal_range_km | end_ideal_range_km | start_km | end_km | distance | duration_min | car_id | inside_temp_avg | start_address_id | end_address_id | start_rated_range_km | end_rated_range_km | start_position_id | end_position_id | start_geofence_id | end_geofence_id
----+------------+----------+------------------+-----------+-----------+-----------+----------------------+--------------------+----------+--------+----------+--------------+--------+-----------------+------------------+----------------+----------------------+--------------------+-------------------+-----------------+-------------------+-----------------
(0 rows)
Have you some ideea please ?
Thanks a lot again
Denis
from teslamate.
now it's all ok.
Great to hear.
Have you some ideea please ?
Your query looks good and returns the correct entries on my side. I assume either a csv file error or a corrupt file.
from teslamate.
I just download the csv files from TelaFi and make all steps here
Do you know if TeslaFi import is still work please ?
Thanks again
Denis
from teslamate.
Do you know if TeslaFi import is still work please ?
For sure, see comments in #3431
from teslamate.
Related Issues (20)
- Unable to delete, edit or add geofencing HOT 2
- Net and gross values in different places HOT 2
- Overview Dashboard Slow (Inside / Outside / Driver Temp) HOT 9
- perf: updates dashboard slow HOT 10
- [dev] Unable to establish code space; postgres user / password not established HOT 3
- Grafana maps not fitting data; zoomed out to world view HOT 5
- State showing offline when alseep since 2024.14.9 HOT 2
- Can't set charging session cost HOT 6
- Wrong battery capacity in Battery Health HOT 7
- Lost all Map Details upgrading from 1.29.2 to 1.30.0 HOT 3
- Grafana map automatic zoom not working HOT 2
- 1.30.1 - Localized Grafana doesn't work as per claim in #4064 HOT 16
- Battery Health not plotting HOT 4
- Teslamate is failing to run after update HOT 2
- Unauthorized using Tesla Fleet API directly HOT 20
- "Range Added" is incorrect, and has incorrect units on the "Charges" dashboard HOT 1
- Status: 500. Message: db query error: pq: time zone "$__timezone" not recognized on Statistics dashboard HOT 2
- Switching to Fleet API from current Owners API. Refersh Token mismatch issue HOT 2
- "Last status change" in the status panel is not displayed correctly HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from teslamate.