PostgreSQL Database Error

PostgreSQL Database directory appears to contain a database; Skipping initialization FATAL: database files are incompatible with server DETAIL: The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0 (Debian 16.0-1.pgdg120+1).
5 Replies
jrasm91
jrasm912y ago
If you want to upgrade from postgres 15 to 16 you cannot simply use a new docker image. That will not work.
Helio4k
Helio4kOP2y ago
Is there another way? or shoudl i just keep it on version 15?
jrasm91
jrasm912y ago
Up to you. We actually are only using and testing with v14 I believe. You can read the post red upgrade docs, but basically you just need to export the data via pgdumpall and then reimport it into the new database. So like, dump the data, create a new container using a new folder for the database, then load the data, then bring up the rest of the immich containers.
jrasm91
jrasm912y ago
Probably really similar to this: https://immich.app/docs/administration/backup-and-restore But you need to restore to v16
Helio4k
Helio4kOP2y ago
Thank You, Greatly appreciated.

Did you find this page helpful?