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
Hello, it sounds like you will need to reupload everything
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
Backup and Restore | Immich
Database
Ok, thank you!
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
Bulk Upload (Using the CLI) | Immich
You can use the CLI to upload an existing gallery to the Immich server
Awesome! Checking this out
Will uploading this way build the postgres database for searching and what not?
Yep
damn, sick
Thankyou!
Pretty sure the web UI uses the same Api endpoints
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?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
Oh wow
Thankyou again!!
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:

It is from an old Immich installation
And I have 2 accounts within that library/ directory
Including admin
so should I import or upload?
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
first yellow block
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
Correct
For yyour case, probably reupload everything from the library folder would give you a clean start
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
Correct, this would be the catch on Windows
so reupload everything using the CLI seems like a better way for your case anyway
Thankyou bro
No problem dawg
And last thing, I should point to the library folder, not the root folder?
yeah only to the library folder, the other are generated files
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?
make sure that the jobs are finished processing
Yeah lol
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.
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
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 instsanceunfortunately 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
You should be able to use the import command and leave them in place, yes.
thanks I that worked for me