Possible to "resync" old Immich library to fresh install?

I tried to update from version 1.55 to 1.72.2 and it went poorly. I'm running Immich via Docker Desktop. I ended up blowing out all of the old containers and reinstalling. Is there a way to get the new installation to import/"see" my old (from previous installation) uploaded image directories, or must I just import everything over again?
34 Replies
Alex Tran
Alex Tran2y ago
Hello, it sounds like you will need to reupload everything
Alex Tran
Alex Tran2y ago
This is a helpful guide for future reference for backing up and restoring an instance's database https://immich.app/docs/administration/backup-and-restore
BladeOfAnduril
BladeOfAndurilOP2y ago
Ok, thank you!
keklead
keklead2y ago
Hi, just to touch on this again I’m in the same boat, and I have around 60gb worth of media is there an API immich exposes that I can hit so I can programmatically upload everything I really don’t want to manually upload everything from the webui file picker
ddshd
ddshd2y ago
There is an API and CLI
Bulk Upload (Using the CLI) | Immich
You can use the CLI to upload an existing gallery to the Immich server
keklead
keklead2y ago
Awesome! Checking this out Will uploading this way build the postgres database for searching and what not?
ddshd
ddshd2y ago
Yep
keklead
keklead2y ago
damn, sick Thankyou!
ddshd
ddshd2y ago
Pretty sure the web UI uses the same Api endpoints
keklead
keklead2y ago
Ah interesting! Is it necessary to run the CLI from within the immich-server container since it already has the immich command? Because then im not sure how to pass the directory as an arg as it exists outside the container (on my D:/ drive). I guess I should just npm i -g immich on Windows itself then?
ddshd
ddshd2y ago
You can run the immich cli from any machine. Only for imports the path you pass into the command must be the same on the server and the machine running the command. For uploads it doesn’t matter
keklead
keklead2y ago
Oh wow Thankyou again!!
keklead
keklead2y ago
What is actually the distinction between importing and uploading? The docs seem to say if you have an existing library then you import instead of upload, and I technically do have an existing library (I think) and it looks like this:
No description
keklead
keklead2y ago
It is from an old Immich installation And I have 2 accounts within that library/ directory Including admin so should I import or upload?
Alex Tran
Alex Tran2y ago
upload will actually move the file to the new location, with importing, the files will stay at the location. Please read the caveat from the documentation
Alex Tran
Alex Tran2y ago
first yellow block
keklead
keklead2y ago
Okay that’s interesting It says read only gallery, so future uploads from mobile wouldn’t populate this library? I have to say that I don’t quite understand that yellow block the points seem to contradict each other
Alex Tran
Alex Tran2y ago
Correct For yyour case, probably reupload everything from the library folder would give you a clean start
keklead
keklead2y ago
That sounds a lot simpler. There seems to be a stipulation with importing where the path to the volume inside the container has to be identical to the path to the library outside which can’t be done on Windows unless I’m reading that wrong
Alex Tran
Alex Tran2y ago
Correct, this would be the catch on Windows so reupload everything using the CLI seems like a better way for your case anyway
keklead
keklead2y ago
Thankyou bro
Alex Tran
Alex Tran2y ago
No problem dawg
keklead
keklead2y ago
And last thing, I should point to the library folder, not the root folder?
Alex Tran
Alex Tran2y ago
yeah only to the library folder, the other are generated files
keklead
keklead2y ago
the upload seems to have partially worked so far (facing 500 internal error issues but I think it could be due to outdated docker compose file) I can even see the media on the webui but it’s not in the new directory?
Alex Tran
Alex Tran2y ago
make sure that the jobs are finished processing
keklead
keklead2y ago
Yeah lol
jrasm91
jrasm912y ago
And this doesn't even matter if you run the command on the server itself. The paths only need to be the same if you run import on another machine.
coxtor
coxtor2y ago
I'd like to pick up here: I stupidliy wiped my whole data to and am facing the same issue: so in a nutshell can I keep my old uploadlocation in the env file and only import the current files from the same directory as in the uploadlocation directory? Can you give an example command for doing using the CLI? Can I then still continue to upload new images with clients ? bump
Alex Tran
Alex Tran2y ago
Hello, did you backup the database? if you did not backup the database, the only option is to use the CLI to reupload all of the files in the library to then new instsance
coxtor
coxtor2y ago
unfortunately I did not. Can I use the --import option? how do I reuse the same directory for the images or do i need to move them to a new directory basically what I am wondering here - thanks
jrasm91
jrasm912y ago
You should be able to use the import command and leave them in place, yes.
coxtor
coxtor2y ago
thanks I that worked for me

Did you find this page helpful?