mirror of
https://github.com/immich-app/immich
synced 2025-06-11 01:19:46 +00:00
865 B
865 B
Backup and Restore
Database
:::info Refer to the official postgres documentation for details about backing up and restoring a postgres database. :::
The recommended way to backup and restore the Immich database is to use the pg_dumpall
command.
docker exec -t immich_postgres pg_dumpall -c -U postgres | gzip > "/path/to/backup/dump.sql.gz"
gunzip < /path/to/backup/dump.sql.gz | docker exec -i immich_postgres psql -U postgres -d immich
Filesystem
Immich stores two types of content in the filesystem: (1) original, unmodified content, and (2) generated content. Only the original content needs to be backed-up, which includes the following folders:
UPLOAD_LOCATION/library
UPLOAD_LOCATION/upload
UPLOAD_LOCATION/profile