Skip to content

chadweimer/docker-postgres-upgrade

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

postgres-upgrade

Docker image that helps with upgrading postgres

Usage

You will need to mount the new and old data directories for postgres in the container at /data/pg<version> (for example, /data/pg15/ and /data/pg16). This is the directory where your data exists (there will be a PG_VERSION file in this directory for the version you're upgrading from):

docker run -it --rm \
  -v /path/to/my/postgres/data/pg15:/data/pg15 \
  -v /path/to/my/postgres/data/pg16:/data/pg16 \
  -e PGUSER=some-user
  ghcr.io/chadweimer/postgres-upgrade:15-to-16

Building the image

Check to make sure the version you're trying to upgrade from is available in the Alpine packages. Here is an few example:

Example: 15 to 16:

docker build --pull \
  --build-arg OLDVER=15 \
  --build-arg NEWVER=16 \
  -t ghcr.io/chadweimer/postgres-upgrade:15-to-16 .

About

Docker image to help with postgres upgrades

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Shell 74.6%
  • Dockerfile 25.4%