I
Immich•5mo ago
Stooovie

revive an old backup

hi, I lost current Immich install due to my incompetence and all I have is a backup from July 3rd this year. I can restore it but what then? How do I get a verison that old (I think it's something like 0.106, I updated it fairly dilligently) up to the latest version? There were many docker compose changes in the meantime. I would really like to do this and not start from scratch, if at all possible
72 Replies
Immich
Immich•5mo ago
:wave: Hey @Stooovie, Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:. References - Container Logs: docker compose logs docs - Container Status: docker ps -a docs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy - Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA Checklist I have... 1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time). 2. :ballot_box_with_check: read applicable release notes. 3. :ballot_box_with_check: reviewed the FAQs for known issues. 4. :ballot_box_with_check: reviewed Github for known issues. 5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy). 6. :ballot_box_with_check: uploaded the relevant information (see below). 7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable (an item can be marked as "complete" by reacting with the appropriate number) Information In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider: - Your docker-compose.yml and .env files. - Logs from all the containers and their status (see above). - All the troubleshooting steps you've tried so far. - Any recent changes you've made to Immich or your system. - Details about your system (both software/OS and hardware). - Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h). - The version of the Immich server, mobile app, and other relevant pieces. - Any other information that you think might be relevant. Please paste files and logs with proper code formatting, and especially avoid blurry screenshots. Without the right information we can't work out what the problem is. Help us help you ;) If this ticket can be closed you can use the /close command, and re-open it later if needed.
bo0tzz
bo0tzz•5mo ago
You restore it then go through the versions/breaking changes just as if you had it running without upgrading since then
Stooovie
StooovieOP•5mo ago
so I basically edit the yml and env files version by version? and then do the usual "docker compose pull && docker compose up -d" so it updates from the old 0.106 to the lates 0.122?
Mraedis
Mraedis•5mo ago
Instead of release you specify the specific version and then change that one at a time after restoring she upgrade
bo0tzz
bo0tzz•5mo ago
You'll want to specifically set the tag on the image to the particular version you want
Stooovie
StooovieOP•5mo ago
that sounds like a day of work. okay, thanks!
bo0tzz
bo0tzz•5mo ago
Here's a list of the breaking changes you can step through
Stooovie
StooovieOP•5mo ago
ah, perfect, thank you after restoring the proxmox backup and running it, it doesn't seem to run. i check the correct IP with "ip a", tr to connect to it (http://192.168.0.161:3001) and get nothing. "docker ps" says the immich container is running. I don't want to risk inadvertently updating a 500GB container, (it takes 7 hours to restore ), any other tips?
Mraedis
Mraedis•5mo ago
Gonna need to see that env file and logs 👀
Stooovie
StooovieOP•5mo ago
port is set to 2283:3001 in the env, none of those work
Mraedis
Mraedis•5mo ago
remember that the old versions also have their own composes they are linked on the release pages
Stooovie
StooovieOP•5mo ago
understood. the backup should be complete and self-contained, I did test it back then env: DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_PASSWORD=postgres DB_DATABASE_NAME=immich REDIS_HOSTNAME=immich_redis UPLOAD_LOCATION=/root/media TYPESENSE_API_KEY=some-random-text PUBLIC_LOGIN_PAGE_MESSAGE= IMMICH_WEB_URL=http://immich-web:3000 IMMICH_SERVER_URL=http://immich-server:3001 IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003 compose is linked in the OP
Mraedis
Mraedis•5mo ago
Yes if you use that compose then it's trying to use v 1.122.1 i.e. immich:release The compose files we use have release set as env var
Stooovie
StooovieOP•5mo ago
any way to find out what version is actually installed?
Mraedis
Mraedis•5mo ago
docker image list
Stooovie
StooovieOP•5mo ago
doesn't look like it
Stooovie
StooovieOP•5mo ago
this looks like almost an impossible problem to solve then
Mraedis
Mraedis•5mo ago
hcr.io/immich-app/immich-server release 1b05b09d5e10 6 months ago 1.55GB
ghcr.io/immich-app/immich-machine-learning release e3b4178908f3 6 months ago 769MB
hcr.io/immich-app/immich-server release 1b05b09d5e10 6 months ago 1.55GB
ghcr.io/immich-app/immich-machine-learning release e3b4178908f3 6 months ago 769MB
Most likely culprits
Stooovie
StooovieOP•5mo ago
yeah but I have no idea what version those actually are. the only pointer is creation date of that backup, which is 3rd June
Mraedis
Mraedis•5mo ago
Did you restore the whole VM that runs the containers? 👀
Stooovie
StooovieOP•5mo ago
yes, it's a Proxmox LXC nothing has been touched since that day in the LXC i'd think it would just run the installed version, but no
Mraedis
Mraedis•5mo ago
I think it should yes But let's see
Stooovie
StooovieOP•5mo ago
thanks for your time btw
Mraedis
Mraedis•5mo ago
closest releases to june 3rd is 1.105.1 on may 14, next is 1.106.0 on jun 10 Trying to figure out how to check hashes on ghcr.io >.>
Stooovie
StooovieOP•5mo ago
"image: ghcr.io/immich-app/immich-server:0.105.1" is not enough is it?
Mraedis
Mraedis•5mo ago
1.105.1*
Zeus
Zeus•5mo ago
Few things here. 1), a VM/LXC backup isn’t guaranteed to have file consistency especially the database 2) we do not support LXC officially So this might not be possible tbh Perhaps mraedis can work some magic 😉
Stooovie
StooovieOP•5mo ago
oh, ok. it was running great but understood
Zeus
Zeus•5mo ago
That’s how docker in LXC tends to be, it works fine until it doesn’t
Stooovie
StooovieOP•5mo ago
right so the preferred way to run immich on this server would be a VM with docker? instead of LXC with docker?
Zeus
Zeus•5mo ago
Yes, VM with docker, for backups do a real database dump We have those built in now
Stooovie
StooovieOP•5mo ago
thanks
Mraedis
Mraedis•5mo ago
(I use an LXC myself )
Stooovie
StooovieOP•5mo ago
okay, i'll probably scratch this then... it would be a super painful task to slowly update Immich over multiple breaking changes
Mraedis
Mraedis•5mo ago
Could you do docker image inspect 1b05b09d5e1 | grep ghcr
Stooovie
StooovieOP•5mo ago
root@Immich:~/immich-app# docker image inspect 1b05b09d5e1 | grep ghcr "ghcr.io/immich-app/immich-server:release" "ghcr.io/immich-app/immich-server@sha256:658b40420d7a39d6eb34c797cec8d36ff315f5adb168301aaf27dc4eafc8e228"
Mraedis
Mraedis•5mo ago
658b40420d7a39d6eb34c797cec8d36ff315f5adb168301aaf27dc4eafc8e228 is indeed v1.105.1
Stooovie
StooovieOP•5mo ago
nice, so i append this number in the "image: " line in the compose yml? like this? services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:658b40420d7a39d6eb34c797cec8d36ff315f5adb168301aaf27dc4eafc8e228
Mraedis
Mraedis•5mo ago
Yeah for all containers switch out :release with :v1.105.1 Not sure hash would work 😄
Stooovie
StooovieOP•5mo ago
ah ok right, brb
Mraedis
Mraedis•5mo ago
https://github.com/immich-app/immich/releases/tag/v1.105.1 in case you want the compose file and so on
Stooovie
StooovieOP•5mo ago
and now "docker compose pull && docker compose up -d" or just "docker compose up -d" or...?
Mraedis
Mraedis•5mo ago
well it already pulled the images and is using them but it shouldn't hurt to do it again 👀
Stooovie
StooovieOP•5mo ago
well yolo
Mraedis
Mraedis•5mo ago
Worst case it will refuse to start, the images shouldn't really ever be broken
Stooovie
StooovieOP•5mo ago
it's creating the postgres, redis and ML containers for 10 minutes now
Zeus
Zeus•5mo ago
Can you please post logs of all those containers if any are available yet ? That doesn’t seem normal
Stooovie
StooovieOP•5mo ago
i can't enter commands rn. it does seem weird yes it's a really fast nvme
Zeus
Zeus•5mo ago
You didn’t run it in screen or anything 😭mate LXC you’re killing us Can’t SSH in?
Stooovie
StooovieOP•5mo ago
i run it in proxmox console, i can ssh ok
Zeus
Zeus•5mo ago
SSH to check the logs? Or you mean the LXC is locked up
Stooovie
StooovieOP•5mo ago
can't ssh... oh man
Stooovie
StooovieOP•5mo ago
No description
Zeus
Zeus•5mo ago
:monakS:
Stooovie
StooovieOP•5mo ago
it's an unprivileged container, no ssh... i'm sorry guys 🤪 i'll nuke this now. no point, too much weirdness. thank you so much anyway images are safe, I just wanted to save time uploading and running the ML models
Zeus
Zeus•5mo ago
If you have the database data it would be possible to extract and recover into a VM
Stooovie
StooovieOP•5mo ago
i do, good idea i have a db backup from yesterday
Zeus
Zeus•5mo ago
Omg just use that lol
Stooovie
StooovieOP•5mo ago
well the images are safe in iCloud 🙂 they will have to be uploaded to immich. i just have the DB
Zeus
Zeus•5mo ago
I’m confused, you don’t have the UPLOAD_LOCATION files?
Stooovie
StooovieOP•5mo ago
no
Zeus
Zeus•5mo ago
If they’re in the LXC you can just extract those as well
Mraedis
Mraedis•5mo ago
But it's right there in the LXC
Zeus
Zeus•5mo ago
What were you trying to recover then?
Stooovie
StooovieOP•5mo ago
the entire thing, install, metadata
Mraedis
Mraedis•5mo ago
Yeah but where are the images stored?
Zeus
Zeus•5mo ago
Yeah but you have a database backup And you have the UPLOAD_LOCATION That’s everything
Stooovie
StooovieOP•5mo ago
don't worry about it, i'll start from scratch, I wanted to decouple the images from the conainer anyway
Mraedis
Mraedis•5mo ago
If you have images + DB backup that's all you need
Stooovie
StooovieOP•5mo ago
thanks 😉

Did you find this page helpful?