Files
archived-teslamate/website/docs/maintenance/upgrading_postgres.md
T
Matthias Wirtz 50423e3c82 feat: officially support postgres 18, add docs for volume mount change (#4890)
* officially support postgres 18, add docs for volume mount change

* docs: update changelog
2025-11-06 09:05:36 +01:00

849 B

title, sidebar_label
title sidebar_label
Upgrading PostgreSQL to a new major version Upgrading PostgreSQL
  1. Create a backup

  2. Stop all TeslaMate containers

    docker compose down
    
  3. Delete the database volume. Be careful, this will delete all your previously recorded data! Make sure that your backup can be restored before you start.

    docker volume rm "$(basename "$PWD")_teslamate-db"
    
  4. Change the postgres version and ensure your volume mount is configured correctly in docker-compose.yml and start the container

    database:
      image: postgres:18-trixie
      ...
      volumes:
        - teslamate-db:/var/lib/postgresql
    
    docker compose up -d database
    
  5. Restore the backup