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?
No description
68 Replies
Alex Tran
Alex Tran•2y ago
try bring down all the container first docker-compose down or restart docker engine with sudo systemctl restart docker
Kenny Schmidt
Kenny SchmidtOP•2y ago
No description
Kenny Schmidt
Kenny SchmidtOP•2y ago
I still get the same error after restarting docker and running docker compose down here is the status of the docker service
Alex Tran
Alex Tran•2y ago
ok now try this docker-compose down then docker ps Can you capture the screenshot of the outputs
Kenny Schmidt
Kenny SchmidtOP•2y ago
yea!
Kenny Schmidt
Kenny SchmidtOP•2y ago
No description
Kenny Schmidt
Kenny SchmidtOP•2y ago
this maybe me being dumb but seems like they are not shutting down for some reason
Alex Tran
Alex Tran•2y ago
Do you have different places where you run the stack i.e in different directory than immich-docker-compose
Kenny Schmidt
Kenny SchmidtOP•2y ago
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?
Alex Tran
Alex Tran•2y ago
the stack is group by location I believe now you just need to manually remove those container docker container stop <Contianer-ID
Kenny Schmidt
Kenny SchmidtOP•2y ago
If I do that would I lose the database etc should I take a back up first?
Alex Tran
Alex Tran•2y ago
no, you just stop the container, you don't delete the volume so it will still be there
Kenny Schmidt
Kenny SchmidtOP•2y ago
gotcha 🙂
Alex Tran
Alex Tran•2y ago
after stopping all can you do docker ps again and capture the sreenshot here
Kenny Schmidt
Kenny SchmidtOP•2y ago
No description
Kenny Schmidt
Kenny SchmidtOP•2y ago
looks like that did the trick 🙂
Alex Tran
Alex Tran•2y ago
ok now docker-compose up again
Kenny Schmidt
Kenny SchmidtOP•2y ago
No description
Alex Tran
Alex Tran•2y ago
now docker ps again
Kenny Schmidt
Kenny SchmidtOP•2y ago
No description
Alex Tran
Alex Tran•2y ago
now docker container ls
Kenny Schmidt
Kenny SchmidtOP•2y ago
No description
Alex Tran
Alex Tran•2y ago
now try docker-compose up --remove-orphans
Kenny Schmidt
Kenny SchmidtOP•2y ago
No description
Alex Tran
Alex Tran•2y ago
if you don't use sudo what is the out pf of docker ps?
Kenny Schmidt
Kenny SchmidtOP•2y ago
sure thing!
Kenny Schmidt
Kenny SchmidtOP•2y ago
No description
Alex Tran
Alex Tran•2y ago
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.
Alex Tran
Alex Tran•2y ago
then restart the server
Kenny Schmidt
Kenny SchmidtOP•2y ago
No description
Kenny Schmidt
Kenny SchmidtOP•2y ago
output after doing the following steps as mentioned 🙂 looks like when I restarted the docker service the containeres started back up
Alex Tran
Alex Tran•2y ago
ok so we should use docker container rm <container-id> instead to remove those containers instead of just stopping it
Kenny Schmidt
Kenny SchmidtOP•2y ago
gotcha 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?
Alex Tran
Alex Tran•2y ago
no, the volume will not be removed but if you want, please make a backup 🙂
Kenny Schmidt
Kenny SchmidtOP•2y ago
perfect sorry to ask redundent questions 🙂
Alex Tran
Alex Tran•2y ago
no worry here good to be cautious
Kenny Schmidt
Kenny SchmidtOP•2y ago
No description
Kenny Schmidt
Kenny SchmidtOP•2y ago
ok all of the containers are now removed compose up -d ?
Alex Tran
Alex Tran•2y ago
yep let's go
Kenny Schmidt
Kenny SchmidtOP•2y ago
promising!
No description
Kenny Schmidt
Kenny SchmidtOP•2y ago
checking now to make sure everything looks right on my instantace 🙂
Kenny Schmidt
Kenny SchmidtOP•2y ago
No description
Kenny Schmidt
Kenny SchmidtOP•2y ago
looks like it may have reset the postgress db?
Alex Tran
Alex Tran•2y ago
try docker volume ls it might have created and used a different volume
Kenny Schmidt
Kenny SchmidtOP•2y ago
No description
Alex Tran
Alex Tran•2y ago
yeah this group is using immich-docker-compose_pgdata instead of kschmidt_pg_data
Kenny Schmidt
Kenny SchmidtOP•2y ago
gotcha is there anyway to swap those to recover that or am I best just restoring from a backup?
Alex Tran
Alex Tran•2y ago
There should be a way but I haven't ran into this situation yet so some researching on the web might help
Alex Tran
Alex Tran•2y ago
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,...
Alex Tran
Alex Tran•2y ago
so something liek this
No description
Kenny Schmidt
Kenny SchmidtOP•2y ago
and that would be in the docker-compose.yml at the very bottom correct? just wanna make sure im editing the right file
Alex Tran
Alex Tran•2y ago
yes correct
Kenny Schmidt
Kenny SchmidtOP•2y ago
No description
Alex Tran
Alex Tran•2y ago
data not date
Kenny Schmidt
Kenny SchmidtOP•2y ago
oh good catch lol
Alex Tran
Alex Tran•2y ago
🙂
Kenny Schmidt
Kenny SchmidtOP•2y ago
No description
Kenny Schmidt
Kenny SchmidtOP•2y ago
look like we need to remove the containers and re run the compose up right?
Alex Tran
Alex Tran•2y ago
did you do docker-compose down first? and FYI you can now run docker-compose without sudo
Kenny Schmidt
Kenny SchmidtOP•2y ago
oh right force of habit!
Alex Tran
Alex Tran•2y ago
avoid using sudo as much as you can as good security practice 😛
Kenny Schmidt
Kenny SchmidtOP•2y ago
🙂 ALEX YOU ARE FREAKING AWESOME that did it!
Alex Tran
Alex Tran•2y ago
Glad it helps you and I both learn a few more things from Docker today
Kenny Schmidt
Kenny SchmidtOP•2y ago
what is your prefered method of payment I want to donate not only for the help today but the amazing product you have developed!
Alex Tran
Alex Tran•2y ago
Thank you, you can find the donation method in the release note 🙂 https://github.com/immich-app/immich/releases/tag/v1.72.1
Kenny Schmidt
Kenny SchmidtOP•2y ago
$25 headed your way I dont have much but its something and id love to give more when I am able 🙂
Alex Tran
Alex Tran•2y ago
hey no worry, thank you I will put this into good use 😄
jrasm91
jrasm91•2y ago
cough cough beer cough cough - fuels his late night coding sessions 😆

Did you find this page helpful?