- Someone who followed the original @Serversathome guide to setting up Immich, and now wants to migrate to the new folder structure.
- Create the new dataset configuration
/mnt/tank/configs/immich1(i.e. do not touch the original dataset/mnt/tank/configs/immich) - Create the new sub-datasets
dataanddb - Sync the data to the new dataset, using rsync
immich -> immich1 - Spin up Immich as a second instance, from TrueNAS Discover Apps (must have a unique name and port, as it will be running concurrently).
- Once everything is confirmed working, then pull down the first instance & delete the original dataset.
- Create a new dataset
/mnt/tank/configs/immich1- Apps permissions.
Note: you can call it what you like, but I will proceed withimmich1
- Create 2x datasets underneath
/mnt/tank/configs/immich1/data- Apps permissions/mnt/tank/configs/immich1/db- Generic permissions
Note: since these datasets are volume mounnts in Docker, you can also call them what you like.
The rsync commands will create the necessary sub-directories in the new datasets. These commands assume the original dataset names are {backups, library, profile, thumbs, video, uploads}. The required sub-directory names are: {backups, library, profile, thumbs, encoded-video, upload}.
IMPORTANT: As per the Immich depreciation notice, it is very imporant to follow these sub-directory naming conventions.
- Run rsync to sync the datasets, with the following commands:
rsync -avhz --progress /mnt/tank/configs/immich/backups/ /mnt/tank/configs/immich1/data/backups/rsync -avhz --progress /mnt/tank/configs/immich/library/ /mnt/tank/configs/immich1/data/library/rsync -avhz --progress /mnt/tank/configs/immich/profile/ /mnt/tank/configs/immich1/data/profile/rsync -avhz --progress /mnt/tank/configs/immich/thumbs/ /mnt/tank/configs/immich1/data/thumbs/rsync -avhz --progress /mnt/tank/configs/immich/video/ /mnt/tank/configs/immich1/data/encoded-video/IMPORTANT the orginial guide used the dataset namevideo. It seems to be important to ensure the sync'ed folder is namedencoded-video.rsync -avhz --progress /mnt/tank/configs/immich/uploads /mnt/tank/configs/immich1/data/uploadIMPORTANT the orginial guide used the dataset nameuploads. It seems to be important to ensure this folder is namedupload.
- Run rsync to sync the database:
rsync -avhz --progress /mnt/tank/configs/immich/db/ /mnt/tank/configs/immich1/db/
Instead of running each individually, this will run sequentially but stop if any command fails to run. i.e. This runs the next command only if the previous one succeeds:
rsync -avhz --progress /mnt/tank/configs/immich/backups/ /mnt/tank/configs/immich1/data/backups/ && \
rsync -avhz --progress /mnt/tank/configs/immich/library/ /mnt/tank/configs/immich1/data/library/ && \
rsync -avhz --progress /mnt/tank/configs/immich/profile/ /mnt/tank/configs/immich1/data/profile/ && \
rsync -avhz --progress /mnt/tank/configs/immich/thumbs/ /mnt/tank/configs/immich1/data/thumbs/ && \
rsync -avhz --progress /mnt/tank/configs/immich/video/ /mnt/tank/configs/immich1/data/encoded-video/ && \
rsync -avhz --progress /mnt/tank/configs/immich/uploads/ /mnt/tank/configs/immich1/data/upload/ && \
rsync -avhz --progress /mnt/tank/configs/immich/db/ /mnt/tank/configs/immich1/db/cd /mnt/tank/configs/immich1/data/thumbsls -lcd /mnt/tank/configs/immich1/backupsls -lcd /mnt/tank/configs/immich1/dbls -l, etc.. etc..
- Grab the Database Password: from the truenas app configuration page (I don't know if this is essential - but didn't want to risk it)
- Grab the Redis Password: from the truenas app configuration page (I don't know if this is essential - but didn't want to risk it)
- On TrueNAS:
Apps > Discover Apps- Search: "Immich"
- Click Install Another Instance
- Application name:
immich1 - Version:
1.9.103
- Enable Machine Learning:
checked - Machine Learning Image Type:
Default Machine Learning Image - Log Level:
Verbose - Database storage type:
HDD
- UserID:
568 - GroupID:
568
- Port Number:
30042(Ensure this is unique - original install was 30041)
- Use Old Storage Configuration (Deprecated):
Unchecked - Data Storage (aka Upload Location):
- Type:
Host path - Enable ACL:
unchecked - Host Path:
/mnt/tank/configs/immich1/data
- Type:
- Machine Learning Cache:
Temporary - Postgres Data Storage:
- Type:
Host path - Enable ACL:
unchecked - Host Path:
/mnt/tank/configs/immich1/db - Automatic permissions:
checked
- Type:
- CPUs:
4 - Memory (in MB):
8000
Click install