Restoring database, a lot of MySQL errors.

I've followed the directions on the Backup and Restore page: https://immich.app/docs/administration/backup-and-restore Problem is I get a lot of SQL errors when running the gunzip < "/path/to/backup/dump.sql.gz" | docker exec -i immich_postgres psql -U postgres -d immich # Restore Backup command. Result is the admin account works, but no photos are imported. Log is attached. Immich has never ran, it's a fresh install, just created using the commands on the page above, also tried with docker-compose up --no-start instead of docker-compose create. But no luck!
4 Replies
bo0tzz
bo0tzz2y ago
Try bringing everything down again and deleting the postgres volume, then only starting the postgres container and none of the others before restoring
stathisk
stathiskOP2y ago
thanks for the reply! I've tried that, creating just postgres. Same thing happens..
bo0tzz
bo0tzz2y ago
Can you post the complete sequence of commands you used?
stathisk
stathiskOP2y ago
docker-compose down -v docker-compose pull docker-compose up --no-start docker start immich_postgres gunzip < "dump.sql.gz" | docker exec -i immich_postgres psql -U postgres -d immich docker-compose up -d just tried again and even though there were errors, it worked. What I did differently was to not wait for the postgres container to start. just enterent gunzip command immediately after starting the postgres container. Everything seems to be in order now!

Did you find this page helpful?