Thank you all! I’ve successfully migrated, and Immich is now running.
For anyone facing similar challenges, here’s a summary of my process that might help:
Initial Setup Before Migration:
Library was stored on an HDD dataset named immich
with the following child datasets:
/mnt/Main/immich/backups
/mnt/Main/immich/library
/mnt/Main/immich/profile
/mnt/Main/immich/thumbs
/mnt/Main/immich/upload
/mnt/Main/immich/video
Postgres data was stored on an SSD dataset named immich
for faster I/O, with the child dataset:
/mnt/Apps/immich/pgData
Migration Process
My library is quite large (~1TB), so instead of using rsync
for everything, I reorganized it via the SSH terminal as truenas_admin
:
- Since the
library
child dataset (/mnt/Main/immich/library) was the largest, I renamed it to data
:
sudo zfs rename Main/immich/library Main/immich/data
- Created a
library
directory inside the newly renamed data
dataset and moved the existing subfolder (admin
in my case) into it:
mkdir /mnt/Main/immich/data/library
mv /mnt/Main/immich/data/admin /mnt/Main/immich/data/library/
- Used
rsync
to transfer the other Immich library datasets into subfolders within the data
dataset with appropriate naming:
sudo rsync -avh --info=progress2 /mnt/Main/immich/backups/ /mnt/Main/immich/data/backups/
sudo rsync -avh --info=progress2 /mnt/Main/immich/profile/ /mnt/Main/immich/data/profile/
sudo rsync -avh --info=progress2 /mnt/Main/immich/thumbs/ /mnt/Main/immich/data/thumbs/
sudo rsync -avh --info=progress2 /mnt/Main/immich/upload/ /mnt/Main/immich/data/upload/
sudo rsync -avh --info=progress2 /mnt/Main/immich/video/ /mnt/Main/immich/data/encoded-video/
- Removed the old datasets via the TrueNAS UI:
/mnt/Main/immich/backups
/mnt/Main/immich/profile
/mnt/Main/immich/thumbs
/mnt/Main/immich/upload
/mnt/Main/immich/video
Postgres Data Migration:
I followed a similar approach for the Postgres data by renaming the dataset:
sudo zfs rename Apps/immich/pgData Apps/immich/postgres-data
New Storage Configuration:
Library is now on the HDD dataset immich
with a single child dataset:
/mnt/Main/immich/data
Postgres data remains on the SSD dataset immich
for faster I/O, with the child dataset:
/mnt/Apps/immich/postgres-data
TrueNAS Immich App Settings:
After reorganizing the storage, I updated the Immich app settings in TrueNAS:
- Unchecked
Use Old Storage Configuration
.
- Set
Data Storage
(Host Path) to /mnt/Main/immich/data
- Set
Postgres Data Storage
(Host Path) to /mnt/Apps/immich/postgres-data
Handling errors:
When starting the Immich app in the TrueNAS UI, check the server
logs for issues:
1. If you encounter an EACCESS
error, such as:
Failed to write upload/encoded-video/.immich: Error: EACCES: permission denied, open 'upload/encoded-video/.immich'
Adjust the data
dataset permissions:
- In Immich app settings, under
Storage Configuration
, enable Enable ACL
and Force Flag
.
- Add two ACL entries: user ID
568
with Modify Access
and user ID 999
with Modify Access
.
2. If you encounter an ENOENT
error, such as:
2025-07-17 20:38:49.325247+00:00e[31m[Nest] 7 - e[39m07/17/2025, 11:38:49 PM e[31m ERRORe[39m e[33m[Microservices:StorageService]e[39m e[31mFailed to read upload/library/.immich: Error: ENOENT: no such file or directory, open 'upload/library/.immich'e[39m
2025-07-17 20:38:49.332232+00:00microservices worker error: Error: Failed to read "<UPLOAD_LOCATION>/library/.immich - Please see https://immich.app/docs/administration/system-integrity#folder-checks for more information.", stack: Error: Failed to read "<UPLOAD_LOCATION>/library/.immich - Please see https://immich.app/docs/administration/system-integrity#folder-checks for more information."
Manually create the .immich
file in the specified path via SSH, in my case:
sudo touch /mnt/Main/immich/data/library/.immich
Hope this will be useful for someone, thanx again!