© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
ImmichI
Immich•13mo ago•
25 replies
NinjaEd

Attempting to restore immich from a database backup

Hi devs,
I recently was migrating which volume my docker apps resided on, on my nas, and somehow in the process of the mgiration seemed to break soemthing with the immich app. It looked to be running healthily, but I couldn't get to the main page. I thought I would redeploy the docker container, but upon starting up the app realised that the library did not port over like other docker apps when the volume doesn't change.

I attempted to follow the instructions here https://immich.app/docs/administration/backup-and-restore/#manual-backup-and-restore and got as far as the gunzip line (With some minor modifications to the prompts). I'll be the first to admit that I'm not the most tech savy.

When I try to paste the commands as is (with the exception of modifying the file path of the sql.gz file), I get a variety of errors "-bash: syntax error near unexpected token
('
-bash: syntax error near unexpected token 
('
-bash: syntax error near unexpected token 
|'"

I imagine this probably has to do with how I'm pasting the commands in. Should these lines be pasted all together "gunzip < "/volume3/docker/immich-app/library/backups/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 --username=postgres"

I'm accessing a nas through the terminal app on a mac computer (if that's relevant)

Thanks
ImmichJoin
A place to hang out, get support, discuss Immich, get announcements about releases and anything else going on.
36,590Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

attempting to restore from backup
ImmichIImmich / help-desk-support
3w ago
restore immich from backup?
ImmichIImmich / help-desk-support
8mo ago
Restore faulty Immich from backup
ImmichIImmich / help-desk-support
3mo ago
Cannot restore Immich from backup
ImmichIImmich / help-desk-support
7mo ago