DB Restore ERROR
i get var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "postgres" does not exist
wehn trying to restore the database.
any suggestions ?
15 Replies
Can you outline the exact steps that you were using?
hi alex .. i just managed to use the user outlined in the stack yaml environment:
- TZ=Europe/Vienna
- POSTGRES_DB=immich
- POSTGRES_USER=immichuser
- POSTGRES_PASSWORD=immichpw
when i add the user immichuser at the end :gunzip < β/volume1/docker/immich/Immich-DB.sql.gzβ | docker exec -i Immich-DB psql -U immichuser -d immich # Restore Backup
it does not throw this error .. now i have -ash: βdocker/immich/Immich-DB.sql.gzβ: No such file or directory...
for me its just rafting in wilkd waters hee π
π€
this was used to backup the database docker exec -t Immich-DB pg_dumpall -c -U postgres | gzip >"/volume1/Heimdall/Documente/immich_Backups/dump.sql.gz" and now im trying to restore
it all started with my iphone updating the app automatically to .86 so i needed to upgrade the server ..
you need to point to this path for the restore file
/volume1/Heimdall/Documente/immich_Backups/dump.sql.gz

it is still not restoring
what is the error message?
no error see picture above .. i enter the gunzip.... and it ends with a blinking >
Can you follow the guide exactly laid out in this page https://immich.app/docs/administration/backup-and-restore
Backup and Restore | Immich
Database
i think my backup is broken.. i zipped the whold db folder .. is this any help for me ?
thanks .. thats what i did
i restored the database folder but cannot login on the web ui ..
Hi Alex. I see this doc all the time refered, but in my opinion the instructions are not clear. Do we need to restore using the same docker-compose version we did the backup with? Do we need to copy the files to the location prior or after the restore? Sorry, but have tried many times to restore, but always had to do the CLI upload.
Do we need to restore using the same docker-compose version we did the backup withI think restoring means to transfer to the same postgres version it would not be a restore process but an upgrade process if you are going to a different version, correct? The file that get dumped is the database information, you restore to a new instance by populating those information from your previous instance does it help answer your questions?
It helps indeed. My apologies for my lack of knowledge. Still learning the terms "postgres" and all my linux experience comes from only wanting to install Immich. Will try again to make it work
No problem man, let me know if we can help with anything