You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
I'm new to Immich and absolutely love it. Unfortunately, I have now lost access to my pictures. I updated Immich to version 1.135.3, which worked. Then, when I tried to log in on another computer, my credentials didn't work. I logged out on a PC where I could still log in to Immich, thinking I could log in again. But I received an "invalid credentials" message.
So, I asked ChatGPT for help. That was not my best idea. After modifying the docker-compose.yml file, creating the .env file, and running the docker compose down/pull/up commands, the PostgreSQL database is empty. However, in /home/username/immich-app/library, there are more than 200 GB of data.
How can I access my pictures again?
Many thanks in advance!
"the PostgreSQL database is empty" - did you check the directory where Postgresql data is located? Just to be sure that PG data is completely gone (then you need to restore from backup). Otherwise your Postgresql DB data might be on disk somewhere still. If you can post docker-compose.yml and .env - before (initial) and after the troubleshooting session with ChatGPT - it would be useful too.
Could you double check the restoration command? It looks unexpected at the end here --username=postgres>. Is it a redundant angle bracket here? That will confuse shell.
2 and 3. Without an .env file the compose project would not be valid, so it is/was somewhere definitely nearby the docker-compose.yml. If it was the default from example.env linked in the installation doc, then DB_DATA_LOCATION points to a subfolder: postgres. If you emptied that subfolder during troubleshooting, then DB data is gone for real. I think this is the case.
This run without an error: gunzip --stdout "/home/stefan/immich-app/library/backups/immich-db-backup-1752544800008.sql.gz" | sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" | docker exec -i immich_postgres psql --dbname=postgres --username=postgres
Here my current .env :
# Speicherort für hochgeladene Fotos/Videos
#UPLOAD_LOCATION=/home/stefan/immich-upload
UPLOAD_LOCATION=/home/stefan/immich-app/library
# Speicherort für Datenbankdaten
#DB_DATA_LOCATION=/home/stefan/immich-db
#DB_DATA_LOCATION=/home/stefan/immich-app/postgres
#DB_DATA_LOCATION=/home/stefan/immich-db
DB_DATA_LOCATION=/home/stefan/immich-db
# PostgreSQL-Zugangsdaten
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_DATABASE_NAME=immich_postgres
# Order from ChatGPT on 16th of July 2025:
IMMICH_VERSION=v1.135.3
Current status: I can successfully login in Immich-Frontend, but no pictures are shown. I think a path is wrong. Directory /home/stefan/immich-app/library is full of stuff.
Yippie Yah Yei! I got it. I changed in the .env the DB_DATABASE_NAME=immich_postgres in DB_DATABASE_NAME=immich. After docker compose down and docker compose up -d I can login again all my data is there.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I'm new to Immich and absolutely love it. Unfortunately, I have now lost access to my pictures. I updated Immich to version 1.135.3, which worked. Then, when I tried to log in on another computer, my credentials didn't work. I logged out on a PC where I could still log in to Immich, thinking I could log in again. But I received an "invalid credentials" message.
So, I asked ChatGPT for help. That was not my best idea. After modifying the docker-compose.yml file, creating the .env file, and running the docker compose down/pull/up commands, the PostgreSQL database is empty. However, in /home/username/immich-app/library, there are more than 200 GB of data.
How can I access my pictures again?
Many thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions