Closed jamietudor closed 2 weeks ago
Hello, although I am unable to provide effective assistance on this issue. But I am still very curious about how you moved a container belonging to one server to another server's container. I attempted to reinstall the container on another server, but I was unable to transfer the data in the Postgres database. I tried the method in https://docs.teslamate.org/docs/maintenance/backup_restore/ ,but it cannot succeed either. Sincerely need your solution, much love.
I followed the document you linked to. I installed the Teslamate container on a new server in the normal way, stopped both the old and the new container, then ran the scripts on that page to backup the database from the old and restore to the new.
Apart from this visualisation issue which I'm experiencing, it worked first time with no issues.
Hey, i think i just fixed this problem.
The method in https://docs.teslamate.org/docs/maintenance/backup_restore/ can't move the data of table positions
. So we need to move it ourself.
if your original data still exist, please try:
positions
data by : docker compose exec -T database pg_dump -U teslamate teslamate -t positions -F c > teslamate-positions.dat
positions
data to your new container by : docker compose exec -T database pg_restore -U teslamate -d teslamate -t positions teslamate-positions.dat
(ps. I used pgAdmin to restore the data, and recommand)I actually bought a new Tesla so the old data is now gone. Good fix though, very useful if I need to move containers again.
The method in https://docs.teslamate.org/docs/maintenance/backup_restore/ can't move the data of table
positions
. So we need to move it ourself.if your original data still exist, please try:
- Backup
positions
data by :docker compose exec -T database pg_dump -U teslamate teslamate -t positions -F c > teslamate-positions.dat
- Resotre
positions
data to your new container by :docker compose exec -T database pg_restore -U teslamate -d teslamate -t positions teslamate-positions.dat
(ps. I used pgAdmin to restore the data, and recommand)
If it's true that the position table is not backed up, we need to look into it. @brianmay @swiffer
The data I get from the pg_dump command in the docs looks OK to me... But not really sure what I should be looking for.
Same for me, but my visited dashboard only shows places I visited since my last restore
I don't doubt there is a problem, but at loss to explain.
Sure that there are not any errors when restoring? Postfix does have strong relation constraints, if for example we tried to restore the positions entry and the corresponding car or drive was available (because the restore order was wrong), that would cause an error.
But in my dump the order looks fine.
I guess I should try to restore dump to a test database and see what happens.
I just did a full backup and restore to a test database, and to me it looks like all the data is there in the positions table.
Wondering if somehow the car_id changed and got incremented for new data. But that doesn't make sense either, I would expect grafana to display every car.
I have done back/restore multiple times without any issues.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Is there an existing issue for this?
What happened?
I moved my Teslamate install from one Docker container on one server to another on another server using the instructions on the site about how to move.
All the data seems to have moved okay - I can see all my old data in the dashboards.
However, the map visualisation on the "Visited" dashboard which shows locations visited on a map has lost all the history. It's only got locations visited since I moved the data.
Expected Behavior
The map should show a visualisation of all historic data in the database.
Steps To Reproduce
View "Visited" dashboard: map shows locations visited since install was moved View "Locations" dashboard: over a year of drive history is present here.
Relevant log output
Screenshots
Visited Map:
Example of a few drives from 6 months ago that aren't visualised:
Additional data
Export of drives table from 2023-01-01 onwards
drives.csv
Type of installation
Docker
Version
v1.27.2