Hello, I need your help with restoring the immich database.
Like many people, I had a glitch in CasaOS due to a Docker update.
I spent the whole day trying to repair and restore the system, and managed to get everything back to normal on a clean system. It’s time to restore Immich - I’m asking for your help, the instructions on the off-site say that you need to enter the following command to restore:
docker compose down -v # CAUTION! Deletes all Immich data to start from scratch
## Uncomment the next line and replace DB_DATA_LOCATION with your Postgres path to permanently reset the Postgres database
# rm -rf DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratch
docker compose pull # Update to latest version of Immich (if desired)
docker compose create # Create Docker containers for Immich apps without running them
docker start immich_postgres # Start Postgres server
sleep 10 # Wait for Postgres server to start up
# Check the database user if you deviated from the default
# Replace <DB_USERNAME> with the database username - usually postgres unless you have changed it.
gunzip --stdout "/path/to/backup/dump.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=<DB_USERNAME> # Restore Backup
docker compose up -d # Start remainder of Immich apps
I have installed a clean version of immich from BigBearCasaOS, please tell me what is the correct code to specify to restore the immich database my path for the DB file is: /mnt/Storage1/Immich/immich-db-backup-20251120T182118-v2.2.2-pg14.19.sql.gz all other parameters are standard for installing Immich from BigBearCasaOS
but unfortunately, I can’t restore my database in any way, I keep getting an error when running the command although I substituted the correct username and tried to select other parameters.
what am I doing wrong and what command should I enter to restore the backup?


