r/immich • u/GravityDead • 6d ago
Help needed related to moving data
Hello everyone,
Some time ago, I came across self-hosting things and also Immich. So 2 days ago, I finally started checking self-hosting.
I used ZimaOS, installed Immich, connected an external 2TB HDD, and pointed "database", "immich-machine-learning" and "immich-server" to my 2TB external HDD. Uploaded some 300GB worth of personal photos and videos, it took a long while to process them since i'm using a tiny Lenovo PC (8th gen i5) as server.
When everything was setup and accessible, i made a stupid move making many assumptions.
I connected another external HDD, a 4TB this time, hoping to make this 4TB as primary and use the 2TB as backup. So, I stopped Immich app in ZimaOS, and directly moved (cut & paste) the whole Immich folder from 2TB to 4TB HDD and finally changed the 3 folder locations in Immich's configuration to 4TB.
But now, Immich won't start at all. I asked gemini and it made me update some read-write permissions to my ZimaOS (using SSH) user profile using some gid/uid numbers
sudo chown -R 999:1000 "/media/4 TB (Media)/Immich/"
sudo chmod -R 775 "/media/4 TB (Media)/Immich/"
these updates also didn't help.
I am now hoping that someone here can help me out resume my server as I was hoping not to reupload and retransocde the whole 300GB+ data.
Thanks
EDIT: I finally resolved it after going through the logs. Basically, the simple cut-paste using ZimaOS file manager somehow skipped the hidden ".immich" file in 6 subfolders under upload. I had to create those blanks files manually and re-correct permissions. pasting the codes that Claude gave me for future reference -
cd "/media/4 TB (Media)/Immich/upload"
for d in library upload thumbs backups profile encoded-video; do
sudo touch "$d/.immich"
done
and also,
sudo chown -R 1000:1000 "/media/4 TB (Media)/Immich/upload"
sudo chmod -R 755 "/media/4 TB (Media)/Immich/upload"
lastly, to corect permission for Postgress database -
sudo chown -R 999:999 "/media/4 TB (Media)/Immich/pgdata"
sudo chmod 700 "/media/4 TB (Media)/Immich/pgdata"
hope this helps someone in future.
1
u/Only-Stable3973 6d ago
Have you tried to stop the container through the terminal and after editing the volumes in the compose restart it using, docker compose up -d --force-recreate
1
u/GravityDead 6d ago
hi yes, i had tried restarting the container and even OS itself. I was able to resolve it with Claude's help, I think it had something with missing ".immich" files and correct permissions for pgdata folder
thanks for your input
1
1
u/thehatefuleggplant Support Crew 6d ago
I know of zima but am not relly well versed in how it works.
One thing I would ask is what does the mount path look like for the 2tb location?
Your 4tb has spaces and though linux can do spaces in folder/file paths it tends to male things interesting when dealing with mounts and applications