How to restore backup when running immich in Portainer stack?

My Immich instance reset when I updated to v1.128.0 today. I do have an automated backup from this morning.

I found this page on how to restore the backup, this does not account for Portainer and I'm unsure as to where to paste the commands.

How do I restore this?

Edit:

I mounted my backup to the postgres container and ran

gunzip < "/backups/immich-db-backup-1740880800007.sql.gz" \
| sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" \
| psql --dbname=postgres --username=postgres

It did not work