How do you handle upgrading a database container image version (e.g., Postgres 15 to 16)?
AdvancedProductionOperations, Rootless & Podman
Answer
Changing the tag against an existing data directory fails: database files are incompatible with server. Take a backup (pg_dumpall), start the new version on a fresh volume and restore, or use pg_upgrade with both binaries (tianon/postgres-upgrade image). Test on a copy, and plan downtime or logical replication for large datasets.
More on Operations, Rootless & Podman
How do you set up rootless Docker on Ubuntu?IntermediateHow do rootless containers handle privileged ports and networking?AdvancedWhat is Podman Quadlet?AdvancedCan Podman run Docker Compose files?IntermediateWhat is a Podman pod?IntermediateHow do you remove all Docker containers, images and volumes safely in a dev environment?Beginner