PostgreSQL in Docker: Major Version Migration Without Data Loss

PostgreSQL doesn’t support in-place upgrades between major versions (15 → 17, 17 → 18). Data must be migrated logically: via dump and restore. Why it’s important: ✅ New versions = security fixes, optimizations, new features ✅ Support for modern clients (Nextcloud, Mastodon, Authelia require recent versions) ✅ Predictability: same process for any project Docker complexity: ❌ Can’t just change image tag - data format is incompatible ❌ pg_upgrade requires simultaneous access to old/new binaries - breaks container isolation ✅ Solution: pg_dumpall → new container → psql < dump 📋 Prerequisites Before starting, ensure: ...

22 Apr 2026 · 3 min · 628 words · Potato Energy Team, ponfertato

Docker Volumes: Backup & Migration

Docker Volumes store data independently from containers but require separate approach for backup. This guide describes universal methods for working with volumes using popular services as examples. 💡 Replace volume names with your own. Methods work with any containers. 📦 Backup volumes Via docker-volume-backup (recommended) docker run --rm \ -v portainer_data:/backup/portainer_data \ -v postgres_data:/backup/postgres_data \ -v redis_data:/backup/redis_data \ -v /opt/docker/backup:/archive \ --entrypoint backup \ offen/docker-volume-backup:v2 Parameters: Parameter Description -v <volume>:/backup/<name> Map volume to backup directory -v /opt/docker/backup:/archive Where to save archive on host --entrypoint backup Run backup mode --rm Remove container after completion Why this method: ...

16 Mar 2026 · 4 min · 665 words · Potato Energy Team, ponfertato