Comment on Immich restore postgresql
witx@lemmy.sdf.org 2 days agoI also wanted to mention that normally Immich dumps its own db into a file backup file somewhere. I forgot where. Check the database dump backup cron job in the settings
Hi, thank you. This was the solution. Immich was storing its backup files to DB_UPLOAD (as defined on the .env) file. There will be a backup folder with a bunch of .sql.gz files) Picked one and an the following command
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>