Immich: Migrating data from a "ixVolume (Dataset created automatically by the system)" to the new directory structure

Greetings!

A few months ago, I installed the Immich application but due to some errors that I wasn’t able to diagnose in-depth at the time, I ended up using the “ixVolume (Dataset created automatically by the system)”.

It’s now several months later, and I’m blocked from upgrading to the latest version unless I uncheck the “Use Old Storage Configuration (Deprecated)”, but I’m holding back until I migrate the data over to the new config. I have created the following directories:

root@vaultron[/mnt/pool/app-config/immich]# ls -laR
.:
total 37
dr-xr-x---  5 root    mark    5 Sep 28 00:01 .
dr-xr-x--- 21 mark    mark   21 Jul 10 07:22 ..
drwxr-x---  8 apps    apps    8 Sep 27 23:57 data
dr-xr-x---  2 root    mark    2 Sep 28 00:01 migration
dr-xr-x---  2 netdata docker  2 Sep 27 23:52 postgres-data

./data:
total 21
drwxr-x--- 8 apps apps 8 Sep 27 23:57 .
dr-xr-x--- 5 root mark 5 Sep 28 00:01 ..
dr-xr-x--- 2 root apps 2 Sep 27 23:57 backups
dr-xr-x--- 2 root apps 2 Sep 27 23:57 encoded-video
dr-xr-x--- 2 root apps 2 Sep 27 23:57 library
dr-xr-x--- 2 root apps 2 Sep 27 23:57 profile
dr-xr-x--- 2 root apps 2 Sep 27 23:57 thumbs
dr-xr-x--- 2 root apps 2 Sep 27 23:57 upload

./data/backups:
total 18
dr-xr-x--- 2 root apps 2 Sep 27 23:57 .
drwxr-x--- 8 apps apps 8 Sep 27 23:57 ..

./data/encoded-video:
total 18
dr-xr-x--- 2 root apps 2 Sep 27 23:57 .
drwxr-x--- 8 apps apps 8 Sep 27 23:57 ..

./data/library:
total 18
dr-xr-x--- 2 root apps 2 Sep 27 23:57 .
drwxr-x--- 8 apps apps 8 Sep 27 23:57 ..

./data/profile:
total 18
dr-xr-x--- 2 root apps 2 Sep 27 23:57 .
drwxr-x--- 8 apps apps 8 Sep 27 23:57 ..

./data/thumbs:
total 18
dr-xr-x--- 2 root apps 2 Sep 27 23:57 .
drwxr-x--- 8 apps apps 8 Sep 27 23:57 ..

./data/upload:
total 18
dr-xr-x--- 2 root apps 2 Sep 27 23:57 .
drwxr-x--- 8 apps apps 8 Sep 27 23:57 ..

./migration:
total 1
dr-xr-x--- 2 root mark 2 Sep 28 00:01 .
dr-xr-x--- 5 root mark 5 Sep 28 00:01 ..

./postgres-data:
total 1
dr-xr-x--- 2 netdata docker 2 Sep 27 23:52 .
dr-xr-x--- 5 root    mark   5 Sep 28 00:01 ..
root@vaultron[/mnt/pool/app-config/immich]#

Now, I just want to extract the data out of the docker container and into the proper directories. I have created a mapping from within the container to pull the data out, but where are the data directories that I need to copy over?

I think I got it. Here is what I did…

  1. My apps configuration in TrueNAS is located at /mnt/pool/app-config. I opened up a command prompt and did a cd to that location.
  2. I then did a mkdir immich followed by a cd immich
  3. I then created the directories data and postgres-data.
  4. The published directions have you making the directories “{upload,thumbs,library,profile,backups,encoded-video}”. DON’T DO THIS.
  5. From the TrueNAS web interface, go to Apps and make sure that Immich is running.
  6. Go to Immich → server → Volume Mounts. This gave me the common root directory of /mnt/.ix-apps/app_mounts/immich/
  7. Stop the Immich app.
  8. Go back to the command prompt and do a cd /mnt/.ix-apps/app_mounts/immich/
  9. Run the following commands one-by-one:
rsync -avh --progress backup /mnt/pool/app-config/immich/data/
rsync -avh --progress library /mnt/pool/app-config/immich/data/
rsync -avh --progress profile /mnt/pool/app-config/immich/data/
rsync -avh --progress thumbs /mnt/pool/app-config/immich/data/
rsync -avh --progress uploads /mnt/pool/app-config/immich/data/
rsync -avh --progress videos /mnt/pool/app-config/immich/data/
  1. We now have to rename two of the directories to match the new formatting. Perform the following commands:
cd /mnt/pool/app-config/immich/data/
mv videos encoded-video
mv uploads upload
  1. Go to the TrueNAS web Interface → Apps → Immich and edit the application.
  2. Go to the “Storage Configuration” section and uncheck the option to “use Old Storage Configuration”.
  3. In the section “Data Storage (aka Upload Location)”, set the type to “Host Path”, then set Host Path to /mnt/pool/app-config/immich/data.
  4. Scroll to the bottom and click on “Update”.
  5. Start the Immich application and watch for any errors.

I’m going to keep my old data around for a few days for monitoring.

1 Like

Thank you, this helped me! I had no idea where to access the ix-apps files.
Something to note, the ‘backup’ folder was ‘backups’ for me, and ‘videos’ was ‘video’ for me. i also moved the postgres_data to a new path and that worked fine.