-
PostgreSql version update - Cannot Restore Database: Unraid Community Applications
Hi, thank you very much for the assistance so far. I ended up running psql as suggested by one of your links. The database restored!!!! Thank you! In case it helps anyone, I successfully ran it as root in the terminal with this specific syntax: [docker exec -i Immich_PostgreSQL /bin/bash -c "PGPASSWORD=changeme psql --username postgres immich" < /mnt/user/appdata/immich/backups/immich-db-backup-20251201T020000-v2.3.1-pg16.10.sql] Reminder that if it works in the container terminal its best to run it there. It seems to have worked. Immich is back up, and user accounts, album and other metadata have been restored. Now just to test uploading photos from the phone. Thank you very much Iakovos_
-
PostgreSql version update - Cannot Restore Database: Unraid Community Applications
After making the changes to the postgres container, it seems like its ready to go. Wasn't the default database called "postgres" in earlier verisons? should be ok, just checking. Next step is running the pg_restore command, within the postgres container command line, correct? I used the below syntax, but nothing happened. No output, no errors from the postgres container terminal pg_restore --filename=immich-db-backup-20251201T020000-v2.3.1-pg16.10.sql I also tried it with the file still in archive format, nothing. Seems a lot easier to restore from the same verision of postgres, rather than across major verisions. I'm learning a decent bit, but still, I plan on making sure to only restore after a new db dump for that version is completed. I unzipped the file and added it to backup path specifically for restoring the file that you mentioned. Still nothing. If I understand correctly, the high-level overview is as follows: delete appdata folder, reinstall the postgres container, ensure volumes are mapped correctly, then run the pg_restore command to rebuild the database, then reinstall the immich container, restart both containers, then immich should be working? Ive done up to mapping volumes, but fail at the restore command. Is there any other information I can provide to help with troubleshooting this?
-
PostgreSql version update - Cannot Restore Database: Unraid Community Applications
Thanks for your reply, I understand a bit more now. I modified the appdata location and moved the database file appropriately. Is it possible to upgrade a dump made by postgres 16 to version 18? It seems to restore the database properly and have dump compatible with pg 18, I would need to restore the DB in postgres 16, then upgrade to postgres 18 and trigger a manual dump. Initializing the postgresql database now returns the following error, as my last dump was made in pg 16. To downgrade to pg 16, is it correct I need to edit the repository for the immich_postgresql docker container, likely to [16-vectorchord0.4.3-pgvectors0.3.0] then temporarily readjust the docker appdata mount point to its previous location? are there any other steps I need to take to restore this database? Thanks again for your help, Iakovos_
-
PostgreSql version update - Cannot Restore Database: Unraid Community Applications
Hello, I recently updated the Immich_PostgreSQL database container from Unraid Community Applications Directly after that, I needed to restore the database [and reinstall immich] due to swapping a hardware component and breaking some networking. Postgres did a major version update recently, [to 18] and my last database dump was from a previous version. Following the restore documentation on immich gets me the following errors. Immich_postgres logs report that I need both! versions of postgres installed to upgrade the database. What is the simplest way to determine the correct postgres version to use to restore the database, or, failing that, to upgrade the database dump? From what I understand about the error, I should have updated both immich and the postgres container before swapping hardware, and triggered a manual database dump in case restoring an install became necessary. I understand this is a basic question, but I can't seem to wrap my head around docker and postgres in this instance. Attempted to install a previous version of the immich postgres repository This failed to work, sadly. Is the correct way to solve this installing a previous version of Immich_Postgresql, restoring the database, and then reinstalling immich as normal? Or am I screwed in this instance? Thanks for your time and expertise, Iakovos_
Iakov_
Members
-
Joined
-
Last visited