Comments (17)
Going to ask the obvious, is teslamate
running? Is TeslaMate the name of the service in your YML file?
from teslamate.
Done #3560.
and reverted :-) #3561
from teslamate.
Good evening
yes teslamate is working.
and this is indeed the name of the container in the yml.
from teslamate.
What is the output of docker compose ps
and your docker-compose.yml
file with passwords removed? Ironically, I do not think TeslaMate web service has to be actually running - just the database service. So that is an odd error to throw.
With the default YML from docs.teslamate.org and the exact same command, I have zero issues. Just updated TeslaMate to 1.28.2
from teslamate.
i'm running teslamate in a stack in Unraid
my stack
`version: "3"
services:
teslamate:
image: teslamate/teslamate:latest
restart: unless-stopped
environment:
- ENCRYPTION_KEY=************
- DATABASE_USER=teslamate
- DATABASE_PASS=**********
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
- MQTT_HOST=mosquitto
ports:
- 4000:4000
volumes:
- ./import:/opt/app/import
cap_drop:
- all
database:
image: postgres:14
restart: unless-stopped
environment:
- POSTGRES_USER=teslamate
- POSTGRES_PASSWORD=**********
- POSTGRES_DB=teslamate
ports:
- 5432:5432
volumes:
- teslamate-db:/var/lib/postgresql/data
grafana:
image: teslamate/grafana:latest
restart: unless-stopped
environment:
- DATABASE_USER=teslamate
- DATABASE_PASS=***********
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
ports:
- 3000:3000
volumes:
- teslamate-grafana-data:/var/lib/grafana
mosquitto:
image: eclipse-mosquitto:2
restart: unless-stopped
command: mosquitto -c /mosquitto-no-auth.conf
ports:
- 1883:1883
volumes:
- mosquitto-conf:/mosquitto/config
- mosquitto-data:/mosquitto/data
volumes:
teslamate-db:
teslamate-grafana-data:
mosquitto-conf:
mosquitto-data:
networks:
teslamate_default:`
from teslamate.
What is the output of docker compose ps
and or docker ps
?
from teslamate.
from teslamate.
On the other hand, docker compose ps does not give anything.
from teslamate.
if you are using the stack and not the compose you should use the command without compose
docker exec -t [container name] pg_dump -U teslamate teslamate > /home/myuser/teslamate.bck
works for me
but I haven't been able to do a restore yet without using compose
from teslamate.
if you are using the stack and not the compose you should use the command without compose
docker exec -t [container name] pg_dump -U teslamate teslamate > /home/myuser/teslamate.bck
works for me
but I haven't been able to do a restore yet without using compose
Good evening,
Indeed, I got an error when trying to restore. On the other hand, thank you I managed to make my backup.
root@unraidmox:~# docker exec -T teslamate_database_1 psql -U teslamate -d teslamate < mnt/disk3/teslamate.bck
unknown shorthand flag: 'T' in -T
See 'docker exec --help'.
from teslamate.
Good evening,
Indeed, I got an error when trying to restore. On the other hand, thank you I managed to make my backup.
root@unraidmox:~# docker exec -T teslamate_database_1 psql -U teslamate -d teslamate < mnt/disk3/teslamate.bck unknown shorthand flag: 'T' in -T See 'docker exec --help'.
there is no flag -T in the "no compose" exec command.
In theory you should use one of the following flags: -t -i -it or no flag instead of -T
but I haven't found a way to make it work
there are some things that I didn't understand, but the backup should be lines of text that contain queries that re-populate the database, which is why to do the restore you are asked to create the functions in the database with that long command, like explained here
I found other commands that create backups with different formats ( source ), but I think that the reason why the backup is done like this is because it must be possible to pass the commands via string from outside the container
the solution I adopted was to connect to the container via bash and execute the commands directly inside the container, moving the files via a folder that I bind
from teslamate.
Postgres DB Backup and restore only works with same postgres version...
Edit: to be clear: Postgres build in db dump can cause issues, thats why we use or own backup and restore commands.
from teslamate.
Postgres DB Backup and restore only works with same postgres version...
We probably should that add to the documentation in https://github.com/teslamate-org/teslamate/blob/master/website/docs/maintenance/backup_restore.md
from teslamate.
Postgres DB Backup and restore only works with same postgres version...
We probably should that add to the documentation in https://github.com/teslamate-org/teslamate/blob/master/website/docs/maintenance/backup_restore.md
Done #3560.
from teslamate.
Postgres DB Backup and restore only works with same postgres version...
We probably should that add to the documentation in https://github.com/teslamate-org/teslamate/blob/master/website/docs/maintenance/backup_restore.md
No, as our process is fine. Do not use postgres backup feature. Use Teslamate backup feature.
I clarified above, sorry for not being clear in the first place.
from teslamate.
Postgres DB Backup and restore only works with same postgres version...
Edit: to be clear: Postgres build in db dump can cause issues, thats why we use or own backup and restore commands.
@JakobLichterfeld
I put the link to those methods just for information.
I used your guide to migrate the database and it worked, but I did it a little differently. I don't use docker compose, but instead I use docker stacks, as does the author of this issue.
I was unable to make the restore command work because of the " -T " and the solution I used is the one I explained previously: I ran the commands from inside the container taking the files from a bind folder
from teslamate.
All good. The -T is mainly needed if you run a sheduled backup via cron. There you do not have a TTY and the command will fail. Using the -T option to provide a TTY and the command will success.
from teslamate.
Related Issues (20)
- Backup not working (on Rasberry PI ) HOT 2
- bug after update docker HOT 1
- Endpoint is only available on fleetapi HOT 64
- [Feature Request] Efficiency based on tire set (Summer/Winter/All Season)
- Missing v1.28.2 ghcr.io build? HOT 2
- Grafana "This site can't be reached" HOT 7
- Intermittent charges incorrectly recorded HOT 15
- Impossible GPS coordinates HOT 1
- Suspend logging is not needed anymore as car falls asleep even while polling HOT 47
- Can't get the carId . already logging by the tesla token! HOT 2
- Release 1.28.3 seemingly not correctly pushed as arm64 image HOT 1
- WebView crashes while charging, if time_zone_not_found HOT 7
- Drive records are not saved HOT 4
- No connection to Tesla API / non-existing domain *done* HOT 3
- Trips with negative gradient do not record correctly HOT 8
- feat: bundle MQTT data in one json blob HOT 8
- Wrong time zone for estimated charge end, TZ environment variable set correctly HOT 9
- New Model Y does not get discovered in version 1.28.3 HOT 1
- Model S MCU1 sleep issues HOT 16
- Battery Health - LFP - Status: 500. Message: convert frame from rows error: pq: division by zero HOT 4
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.