mirror of
https://github.com/teslamate-org/teslamate.git
synced 2026-01-24 21:06:08 +08:00
This reverts commit 6050dc53f3.
The alpine images don't work on the Raspberry Pi because its package
sources contains an old version of libseccomp, which causes the time to
be at 1970: https://github.com/docker-library/postgres/issues/812
31 lines
678 B
Markdown
31 lines
678 B
Markdown
---
|
|
title: Upgrading PostgreSQL to a new major version
|
|
sidebar_label: Upgrading PostgreSQL
|
|
---
|
|
|
|
1. Create a [backup](backup_restore.md)
|
|
2. Stop all TeslaMate containers
|
|
|
|
```bash
|
|
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.
|
|
|
|
```bash
|
|
docker volume rm "$(basename "$PWD")_teslamate-db"
|
|
```
|
|
|
|
4. Change the postgres version in docker-compose.yml and start the container
|
|
|
|
```yml {2}
|
|
database:
|
|
image: postgres:xx
|
|
```
|
|
|
|
```bash
|
|
docker-compose up -d database
|
|
```
|
|
|
|
5. [Restore](backup_restore.md) the backup
|