How to change Immich UPLOAD_LOCATION?

My Immich docker uses /mnt/storage/immich as UPLOAD_LOCATION and I would like to change it to /mnt/storage/containers/immich. When I tried mv /mnt/storage/immich /mnt/storage/containers/immich && docker compose down && docker compose up -d, I had this 2 errors: - Error 1: https://discord.com/channels/979116623879368755/994044917355663450/113450582713121590 - Error 2: https://discord.com/channels/979116623879368755/994044917355663450/1134443627528073306 Then I found the Backup and restore guide https://documentation.immich.app/docs/administration/backup-and-restore#database and it seems like I have to create a new Immich empty instance to restore. How can I do this the simpliest way?
10 Replies
alittlebee
alittlebeeOP2y ago
According to your comment https://github.com/immich-app/immich/discussions/3299, @bo0tzz, since the uploaded images file path are saved in the DB, even with recovery, I do have to give the UPLOAD_LOCATIONS the same on the new system for it to work, right?
GitHub
Do we need to perform server backups? · immich-app immich · Discuss...
If I have a backup of the upload location and I setup a new Immich instance exactly the same a previous instance what do I need a DB backup for? Can I not just trigger metadata and thumbnail jobs f...
Alex Tran
Alex Tran2y ago
you just change the UPLOAD_LOCATION on the same machine, correct?
alittlebee
alittlebeeOP2y ago
Yes, exactly @Alex Literally move UPLOAD LOCATION a couple of levels deeper
Alex Tran
Alex Tran2y ago
Can you post the screenshot of the current directory where all the folders (library, thumb...etc) is at. Also can you provide your .env file and the error messsage you see in the logs
alittlebee
alittlebeeOP2y ago
@Alex I moved the folder back to the original place to make it usable again, so now I am back to square one. This is my original question:
Since Immich doesn't support photo editing, I have been trying to find a way to fill that gap. One way of doing it is to mount the Immich volume to my local PC using MountainDuck via SFTP, edit with DarkTable and let it sync back to the remote volume. However, this has been very slow on my computer and MountainDuck doesn't seem to work reliable on syncing offline files. Another problem is that, I sync the volume to my external hard drive via the software.
I came up with this solution. Since both my NextCloud and Immich are on the same server, I can move the Immich uploade folder volume into a folder in NextCloud. That way, I can use NextCloud client to make the files available offline for fast editing and sync it back later. It is also easier for backup as well. Do you think that could work? Is there anything I should be aware of?
Since Immich doesn't support photo editing, I have been trying to find a way to fill that gap. One way of doing it is to mount the Immich volume to my local PC using MountainDuck via SFTP, edit with DarkTable and let it sync back to the remote volume. However, this has been very slow on my computer and MountainDuck doesn't seem to work reliable on syncing offline files. Another problem is that, I sync the volume to my external hard drive via the software.
I came up with this solution. Since both my NextCloud and Immich are on the same server, I can move the Immich uploade folder volume into a folder in NextCloud. That way, I can use NextCloud client to make the files available offline for fast editing and sync it back later. It is also easier for backup as well. Do you think that could work? Is there anything I should be aware of?
So if I need to do mv /mnt/storage/immich /mnt/storage/nextcloud/user1/immich, how do I make it so that Immich knows that the location has been changed? @Alex can you advise?
Alex Tran
Alex Tran2y ago
You just need to change the upload_location
alittlebee
alittlebeeOP2y ago
But last time I did that, all my images are broken. Did you checkout my other comments above, which I tried to describe the issue in more details.
bo0tzz
bo0tzz2y ago
If you change UPLOAD_LOCATION and copy all the files appropriately, it should work
sogan
sogan2y ago
Internally, Immich just cares about the folder structure in UPLOAD_LOCATION, so it doesn’t need to do anything as long as the contents are the same. If there’s an issue, it would be external to Immich, like if the files have different permissions or something
alittlebee
alittlebeeOP2y ago
Thank you. I'll try that and report back 🙂

Did you find this page helpful?