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
: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.You restore it then go through the versions/breaking changes just as if you had it running without upgrading since then
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?
Instead of release you specify the specific version and then change that one at a time after restoring she upgrade
You'll want to specifically set the tag on the image to the particular version you want
that sounds like a day of work. okay, thanks!
Here's a list of the breaking changes you can step through
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?
Gonna need to see that env file and logs 👀
port is set to 2283:3001 in the env, none of those work
remember that the old versions also have their own composes
they are linked on the release pages
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
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
any way to find out what version is actually installed?
docker image list
doesn't look like it
this looks like almost an impossible problem to solve then
Most likely culprits
yeah but I have no idea what version those actually are. the only pointer is creation date of that backup, which is 3rd June
Did you restore the whole VM that runs the containers? 👀
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
I think it should yes
But let's see
thanks for your time btw
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 >.>
"image: ghcr.io/immich-app/immich-server:0.105.1" is not enough is it?
1.105.1*
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 😉
oh, ok. it was running great but understood
That’s how docker in LXC tends to be, it works fine until it doesn’t
right
so the preferred way to run immich on this server would be a VM with docker? instead of LXC with docker?
Yes, VM with docker, for backups do a real database dump
We have those built in now
thanks
(I use an LXC myself )
okay, i'll probably scratch this then... it would be a super painful task to slowly update Immich over multiple breaking changes
Could you do
docker image inspect 1b05b09d5e1 | grep ghcr
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"
658b40420d7a39d6eb34c797cec8d36ff315f5adb168301aaf27dc4eafc8e228 is indeed v1.105.1
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
Yeah for all containers switch out
:release
with :v1.105.1
Not sure hash would work 😄ah ok
right, brb
https://github.com/immich-app/immich/releases/tag/v1.105.1 in case you want the compose file and so on
and now "docker compose pull && docker compose up -d" or just "docker compose up -d" or...?
well it already pulled the images and is using them but it shouldn't hurt to do it again 👀
well yolo
Worst case it will refuse to start, the images shouldn't really ever be broken
it's creating the postgres, redis and ML containers for 10 minutes now
Can you please post logs of all those containers if any are available yet ? That doesn’t seem normal
i can't enter commands rn. it does seem weird yes
it's a really fast nvme
You didn’t run it in
screen
or anything ðŸ˜mate LXC you’re killing us
Can’t SSH in?i run it in proxmox console, i can ssh ok
SSH to check the logs?
Or you mean the LXC is locked up
can't ssh... oh man

:monakS:
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
If you have the database data it would be possible to extract and recover into a VM
i do, good idea
i have a db backup from yesterday
Omg just use that
lol
well the images are safe in iCloud 🙂 they will have to be uploaded to immich. i just have the DB
I’m confused, you don’t have the UPLOAD_LOCATION files?
no
If they’re in the LXC you can just extract those as well
But it's right there in the LXC
What were you trying to recover then?
the entire thing, install, metadata
Yeah but where are the images stored?
Yeah but you have a database backup
And you have the UPLOAD_LOCATION
That’s everything
don't worry about it, i'll start from scratch, I wanted to decouple the images from the conainer anyway
If you have images + DB backup that's all you need
thanks 😉