Upgrade your PostgreSQL from one version to another.
Reviewed-on: #4 Co-authored-by: CI <ci@16reiche.de> Co-committed-by: CI <ci@16reiche.de> |
||
|---|---|---|
| .forgejo/workflows | ||
| 14-to-15 | ||
| 15-to-16 | ||
| 16-to-17 | ||
| docker-upgrade | ||
| README.md | ||
| renovate.json | ||
PostgreSQL Upgrade
This is a fork of https://github.com/tianon/docker-postgres-upgrade.
Update process
- Create a new directory for the new PostgreSQL version
- Pull the docker image
docker pull source.16reiche.de/thirdparty/docker-postgres-upgrade:15-to-16- Exchange the versions according to the update you want to perfrom.
- Scale down the running PostgreSQL service to 0
- Run
docker run --rm \
-v /home/storage/postgres_data_15:/var/lib/postgresql/15/data \
-v /home/storage/postgres_data_16:/var/lib/postgresql/16/data \
source.16reiche.de/thirdparty/docker-postgres-upgrade:15-to-16
- Exchange the version numbers accordingly
- Make sure the paths on the left side of the volume definition match your host paths.
- Adjust your deployment
- Point to the new DB directory.
- Use the new PostgreSQL version
- Remove the volume
- Open
pg_hba.confand change the IPv4 definition to0.0.0.0/0 - Deploy the service