Db upgrade v15 to v17 - unable to upgrade to tcp, received 409 #4363
Replies: 7 comments 3 replies
-
Did you delete the database volume? https://docs.teslamate.org/docs/maintenance/upgrading_postgres/ |
Beta Was this translation helpful? Give feedback.
-
Hi,
It looks like you forgot to delete the database volume.
Did you complete step 3?
https://docs.teslamate.org/docs/maintenance/upgrading_postgres
…On Fri, 8 Nov 2024 at 16:12 Shreevathsa Jayanna ***@***.***> wrote:
My teslamate is setup on portainer, things were working fine with db
version 15.
Followed backup instructions, generated bkp file.
Updated docker compose db version.
Facing 'unable to upgrade to tcp, received 409' while executing the below
command to restore.
docker exec teslamate-db sh -c 'psql -U teslamate teslamate' << .
DROP SCHEMA public CASCADE;
CREATE SCHEMA public;
CREATE EXTENSION cube WITH SCHEMA public;
CREATE EXTENSION earthdistance WITH SCHEMA public;
.
Docker log shows this:
"FATAL: database files are incompatible with server
DETAIL: The data directory was initialized by PostgreSQL version 15, which
is not compatible with this version 17.0 (Debian 17.0-1.pgdg120+1)."
Please help, thanks in advance!
—
Reply to this email directly, view it on GitHub
<#4363>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHYNAYBF3TMCX3DG2UCKQDTZ7QTY5AVCNFSM6AAAAABRMSGBYCVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZXGQ2DGMBRHE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I tried, but |
Beta Was this translation helpful? Give feedback.
-
Hi,
Remove the *_teslamate-db volume, with the following command
docker volume rm "$(basename "$PWD")_teslamate-db"
…On Sat, 9 Nov 2024 at 10:01 Shreevathsa Jayanna ***@***.***> wrote:
I tried, but docker volume ls or docker volume ls -qf dangling=true
doesn't show any volumes related to teslamate or orphaned. How do i find it
if its still lurking around somewhere in the background?
—
Reply to this email directly, view it on GitHub
<#4363 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHYNAYELD2PODXUYI5KQ3SLZ7URD5AVCNFSM6AAAAABRMSGBYCVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMJZGMZTENI>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
What does the following show?
*docker volume ls*
Find the volume that ends in -db, and remove it.
…On Sat, 9 Nov 2024 at 11:44 Shreevathsa Jayanna ***@***.***> wrote:
Thanks @BluSpanner <https://github.com/BluSpanner> , got below response.
docker volume rm "$(basename "$PWD")_teslamate-db"
Error: No such volume: _teslamate-db
—
Reply to this email directly, view it on GitHub
<#4363 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHYNAYGRD4FWPDJV3X55SDDZ7U5E7AVCNFSM6AAAAABRMSGBYCVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMJZGM3TQOI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Yes.
Either delete everything inside the database volume
OR
delete the database volume, so that it gets re-created when the container
restarts.
…On Sat, 9 Nov 2024 at 11:52 Shreevathsa Jayanna ***@***.***> wrote:
This is my docker compose part for teslamate-db
database:
image: postgres:17
container_name: teslamate-db
restart: on-failure:5
environment:
- POSTGRES_USER=teslamate
- POSTGRES_PASSWORD=sdgljadhgweriuowvxvmn
- POSTGRES_DB=teslamate
volumes:
- /volume1/docker/teslamate/teslamate-db:/var/lib/postgresql/data:rw
networks:
- caddy_network
Does manually deleting everything inside teslamate-db folder help?
—
Reply to this email directly, view it on GitHub
<#4363 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHYNAYDKXXBXBWVGBERXPP3Z7U6ETAVCNFSM6AAAAABRMSGBYCVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMJZGM4DENI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Thanks to @BluSpanner for your responses.
Cheers! |
Beta Was this translation helpful? Give feedback.
-
My teslamate is setup on portainer, things were working fine with db version 15.
Followed backup instructions, generated bkp file.
Updated docker compose db version.
Facing 'unable to upgrade to tcp, received 409' while executing the below command to restore.
Docker log shows this:
"FATAL: database files are incompatible with server
DETAIL: The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 17.0 (Debian 17.0-1.pgdg120+1)."
Please help, thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions