Teslamate: Postgres restore advice needed

Created on 4 Feb 2020  路  6Comments  路  Source: adriankumpf/teslamate

I backed up the database previously and now I would like to restore those couple of weeks worth of missing drives.

So I don't want to drop the database and restore the backup but just restore the missing info.
The backup is from v11.1 and obviously the current version is v12.1 if that matters.

I'm unsure about the dependencies between the tables or how to go about it.

Any advice appreciated.

question

All 6 comments

The FAQ instructions on how to do a backup don't seem to work.

$ docker-compose exec database pg_dump -U teslamate tes
lamate > teslamate.bck
ERROR: No such service: database

From: https://teslamate.readthedocs.io/en/latest/import/teslafi.html

type
$ docker-compose exec db pg_dump -U teslamate teslamate > teslamate.bck

(so db instead of database)

Or change "db" to "database" in your docker-compose.yml (first take it down, afterwards restart it). Then you're inline with the docs here.

I think @mikeh2010 has a DB with missing data which is in a separate instance, he just wants to import that missing period, not backup the current db or restore the other version losing the current version.
I'm in a similar position post a server swap so am interested in a way of importing the missing data - does anyone have a document of the Teslafi export format used in the import here?

ignore my request, I found the format in the api scraper

Thanks

@IMgoRt How did you do it with the api scraper?

@IMgoRt How did you do it with the api scraper?

Sorry, I meant I could see the data structure used, I'll have to do some work to get the data into the correct format :-(

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Try2Fly picture Try2Fly  路  5Comments

kongomongo picture kongomongo  路  5Comments

petariga picture petariga  路  5Comments

bahree picture bahree  路  5Comments

bahree picture bahree  路  3Comments