Create an Immich database dump and copy the files under UPLOAD_LOCATION, along with any external-library files. On the new server, put the files in place and recreate the external mounts before starting Immich. Then choose Restore from backup on the welcome screen and select the dump. Immich Backup and Restore
What to back up
| What to save | Where to look |
|---|---|
| Database dump | Use Create Database Dump for the welcome-screen restore below. Immich stores its built-in dumps in UPLOAD_LOCATION/backups. The database holds file paths and user metadata. Immich Backup and Restore |
Full UPLOAD_LOCATION tree | Include upload/ and library/ for managed photos and videos where those folders are used, profile/ for avatars, thumbs/ for thumbnails and previews, encoded-video/ for transcoded video, and backups/ for built-in dumps. Keep the hidden .immich mount markers. Immich Backup and Restore, Immich System Integrity |
| Media folders on separate mounts | If Compose overrides a folder such as profile/, copy its contents from the actual host path configured for that mount. Immich Backup and Restore, Immich Files Custom Locations |
| External originals and sidecars | Copy the host directories behind the existing external-library import paths. Keep any adjacent .xmp sidecars with the photos or videos they describe. Immich External Libraries, Immich XMP Sidecars |
Create the dump and copy the files
To create a dump from the web interface, leave Immich running. Keep the media files unchanged from the time you create the dump until the filesystem copy finishes. Immich Backup and Restore
- Open Administration → Job Queues. Select Create job at the top right, choose Create Database Dump, then click Confirm. Immich Backup and Restore
- Wait for the new dump to appear in
UPLOAD_LOCATION/backupsor your configured backups mount. Then use your backup tool to copy the files in the table, including the new dump. Immich Backup and Restore, Immich Files Custom Locations
If files are changing during the backup, copying them first can leave the restored database pointing to files added after the copy. Immich Backup and Restore
Export with PostgreSQL on Linux
For command-line recovery with the standard Compose stack and bundled PostgreSQL, stop only immich-server from the Compose project directory and leave PostgreSQL running. Immich recommends stopping the server during a backup to keep the dump and files in sync. Immich Backup and Restore, Docker Compose stop, Immich Docker Compose installation
docker compose stop immich-server
Replace <DB_DATABASE_NAME> and <DB_USERNAME>, including the angle brackets, with the actual database name and user from your configuration. Change the output path to your backup destination before running the export. Immich Backup and Restore, Immich Environment Variables
docker exec -t immich_postgres pg_dump --clean --if-exists --dbname=<DB_DATABASE_NAME> --username=<DB_USERNAME> | gzip > "/path/to/backup/dump.sql.gz"
With Immich stopped and the files unchanged, copy the files in the table with your backup tool. After the copy, bring the original stack back up from its Compose directory. Immich Backup and Restore, Immich Docker Compose installation
docker compose up -d
For scheduled or off-site copies, see Immich’s Borg backup template. Immich Backup Script
Put the files in place on the new server
Prepare docker-compose.yml and .env for a fresh installation. Set UPLOAD_LOCATION to the new media root, then restore the matching data folders before starting Compose. You can pin IMMICH_VERSION to a specific release in .env. Immich Docker Compose installation, Immich Backup and Restore
DB_DATA_LOCATION is the live PostgreSQL storage path. This procedure restores the database from the dump. Immich Environment Variables, Immich Backup and Restore
For example, if the old root was /srv/old-immich/media and the new root is /srv/immich/data, place the saved directories as shown below. For any separately mounted directory, restore into its configured host folder and keep the corresponding container destination in Compose. Immich Backup and Restore, Immich Files Custom Locations
| Old location | New location |
|---|---|
/srv/old-immich/media/backups | /srv/immich/data/backups |
/srv/old-immich/media/encoded-video | /srv/immich/data/encoded-video |
/srv/old-immich/media/library | /srv/immich/data/library |
/srv/old-immich/media/profile | /srv/immich/data/profile |
/srv/old-immich/media/thumbs | /srv/immich/data/thumbs |
/srv/old-immich/media/upload | /srv/immich/data/upload |
For an existing external library, restore the files with the same directory structure. If the host folder has moved, change the host side of the mount and keep the container path that the existing library uses. For example, under immich-server → volumes, replace /mnt/old/photos:/mnt/photos:ro with /mnt/new/photos:/mnt/photos:ro. Immich Backup and Restore, Immich External Libraries
Restore from the welcome screen
If the dump was created before Immich v2.5.0, use the version selector in Immich’s documentation to find the manual restore steps for that release. For an already configured destination, see Immich’s settings restore instructions, which replace the current database. Immich Backup and Restore
From the new server’s Compose project directory, start Immich. Immich Docker Compose installation, Immich Backup and Restore
docker compose up -d
- On the welcome screen, click Restore from backup. Immich enters maintenance mode and checks the storage folders. Immich Backup and Restore
- Review the folder status and file counts to check that the copied files are accessible. Click Next. Immich Backup and Restore
- Select your saved dump from the list or upload the
.sql.gzfile. The compatibility indicator uses the filename to show whether the backup version matches the destination’s version, differs from it, or is unknown. Immich Backup and Restore - Use a compatible Immich version when possible, then click Restore. A backup from a different version may require database migrations, which Immich attempts automatically. Immich Backup and Restore
Verify the database and originals
- Database. Confirm the restore succeeds. Immich performs a health check during restoration and rolls back to its restore point if the restore fails. Immich Backup and Restore
- Managed files. On the maintenance page, run a full integrity check for missing files and checksum mismatches, then review the results. If you backed up only
library/,upload/, andprofile/, rerun thumbnail generation and transcoding for all assets. Immich System Integrity, Immich Backup and Restore - External files. Check that each existing import path matches its Compose mount. Open a shell with
docker exec -it immich_server bashand list the import directory, for example withls /mnt/photos. If you use a dedicated microservices container, check the same mount there too. Immich External Libraries - Originals. If a photo was edited in Immich, choose the original version when downloading. Immich Backup and Restore, Immich External Libraries, Immich Editing
Evidence and limits. The procedure follows Immich’s backup and restore documentation for its v3 Docker Compose setup and Docker’s Compose stop reference. The documentation was checked on November 27, 2026. The commands and restore were not run for this guide. Immich Backup and Restore, Immich Docker Compose installation, Docker Compose stop