Error when trying to update to latest verison of immich
any ideas why I get an error about the name already being in use isnt the idea to redeloy the same containers just with the newer images?

68 Replies
try bring down all the container first
docker-compose down
or restart docker engine with
sudo systemctl restart docker

I still get the same error after restarting docker and running docker compose down
here is the status of the docker service
ok now try this
docker-compose down
then docker ps
Can you capture the screenshot of the outputsyea!

this maybe me being dumb but seems like they are not shutting down for some reason
Do you have different places where you run the stack i.e in different directory than
immich-docker-compose
when I first installed I ran it in the home directory of kschmidt then created a folder called immich-docker-compose and moved the env and compose file there would that cause the problem and if so why is that?
the stack is group by location I believe
now you just need to manually remove those container
docker container stop <Contianer-ID
If I do that would I lose the database etc should I take a back up first?
no, you just stop the container, you don't delete the volume so it will still be there
gotcha 🙂
after stopping all can you do
docker ps
again and capture the sreenshot here
looks like that did the trick 🙂
ok now docker-compose up again

now docker ps again

now
docker container ls

now try
docker-compose up --remove-orphans

if you don't use
sudo
what is the out pf of docker ps
?sure thing!

oh right to make things easier can you follow this guide up to step 3 https://docs.docker.com/engine/install/linux-postinstall/
Docker Documentation
Linux post-installation steps for Docker Engine
Find the recommended Docker Engine post-installation steps for Linux users, including how to run Docker as a non-root user and more.
then restart the server

output after doing the following steps as mentioned 🙂
looks like when I restarted the docker service the containeres started back up
ok so we should use
docker container rm <container-id>
instead
to remove those containers
instead of just stopping itgotcha and just to be on the safe side would we need to take a backup of the postgress database then sense we are removing them?
no, the volume will not be removed
but if you want, please make a backup 🙂
perfect sorry to ask redundent questions 🙂
no worry here
good to be cautious

ok all of the containers are now removed
compose up -d ?
yep let's go
promising!

checking now to make sure everything looks right on my instantace 🙂

looks like it may have reset the postgress db?
try
docker volume ls
it might have created and used a different volume
yeah this group is using
immich-docker-compose_pgdata
instead of kschmidt_pg_data
gotcha is there anyway to swap those to recover that or am I best just restoring from a backup?
There should be a way but I haven't ran into this situation yet so some researching on the web might help
Stack Overflow
Re-using existing volume with docker compose
I have setup two standalone docker containers, one runs a webserver another one runs a mysql for it.
Right now I was attempting to have it working with docker-compose. All is nice and it runs well,...
so something liek this

and that would be in the docker-compose.yml at the very bottom correct? just wanna make sure im editing the right file
yes correct

data not date
oh good catch lol
🙂

look like we need to remove the containers and re run the compose up right?
did you do docker-compose down first?
and FYI you can now run docker-compose without sudo
oh right force of habit!
avoid using sudo as much as you can as good security practice 😛
🙂
ALEX YOU ARE FREAKING AWESOME
that did it!
Glad it helps
you and I both learn a few more things from Docker today
what is your prefered method of payment I want to donate not only for the help today but the amazing product you have developed!
Thank you, you can find the donation method in the release note 🙂 https://github.com/immich-app/immich/releases/tag/v1.72.1
$25 headed your way I dont have much but its something and id love to give more when I am able 🙂
hey no worry, thank you I will put this into good use 😄
cough cough beer cough cough - fuels his late night coding sessions 😆