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?Backup and Restore | Immich
Database
10 Replies
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...
you just change the UPLOAD_LOCATION on the same machine, correct?
Yes, exactly @Alex
Literally move UPLOAD LOCATION a couple of levels deeper
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@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:
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?You just need to change the upload_location
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.
If you change UPLOAD_LOCATION and copy all the files appropriately, it should work
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
Thank you. I'll try that and report back 🙂