Immich 1.101.0 → 1.102.0
1 version, 1 with breaking changes, 0 required stops
Version by version, oldest first
1.102.0 2024-04-19
Breaking
⚠️ Breaking Changes (OPT-IN ONLY)
Caution
For people always pulling the latest compose file, this is a breaking change! Disregarding the notes will result in (temporary) data loss!
Background
In the past, we've seen many cases where people accidentally deleted their Postgres data by (unintentionally) deleting the docker volume (e.g., docker compose down -v). This is unfortunate as there is no way to recover that data (if you don't have a backup, MAKE BACKUPS!). We have been thinking about mounting the Postgres data to a local folder for a while but always hesitated, as this would break existing instances due to people not reading the change logs carefully. However, there have been too many issues, and we ultimately decided to make that change.
What do I have to do?
Nothing. You should only copy the compose file with every new release if we tell you to do so in the release notes. Generally, we don't recommend making changes to existing instances. If you have never had issues, attempting to migrate the data will put it at (an unnecessary) risk.
I want to migrate my docker volume to a local folder
Unfortunately there isn't a "proper" way to export a docker volume. The recommended method is to mount the volume and the directory (you want to copy your data to) to an arbitrary container, get a shell inside that container and copy the folder manually.
Caution
Take backups before attempting this. Especially make sure you have a current database dump (
pg_dump)
Warning
Do not use a directory under
/mntfor the postgres location if you are using WSL. Generally (on all operating systems) we recommend against using a network share for your database location. This is bound to break and cause all sorts of weird issues.
If you would like to opt-in to this change, there is an additional environment variable in the .env file as well as a modification in your existing docker-compose.yml file.
docker-compose.yml file
database:
container_name: immich_postgres
image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
volumes:
- - pgdata:/var/lib/postgresql/data
+ - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
restart: always
volumes:
- pgdata:
model-cache:
.env file
[...]
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
+DB_DATA_LOCATION=./postgres
Breaking
- mount postgres folder to local directory by default by @danieldietzler in https://github.com/immich-app/immich/pull/8443
Release notes from github.com/immich-app/immich/releases, checked 17 hours ago. Only text the vendor marks as breaking, or puts in a warning/caution/important note, or a plain note, is shown (a note that asks nothing of the admin, such as a call for feedback or testing, is not); read the full notes for anything else.