Upgrade from very old version to latest version
Hello there folks, I made a backup of my immich server, however I did not have the forsight to record the version I was running at the time.
I'm guessing it was somewhere around V1.112.1 running from docker.
I installed @latest with a proxmox lxc script thinking I could apply my DB to the new installation, but it seems I am very far behind the latest release.
I read some other posts here suggesting I should iterate over all releases with breaking changes. This seems like quite a journey.
I was hoping some kind soul could help me bring my old DB up to spec.
11 Replies
:wave: Hey @David Kerr,
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. :blue_square: 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.Migration "1744910873969-InitialMigration" failed
Migrations failed: Error: Invalid upgrade path.
For more information, see https://immich.app/errors#typeorm-upgrade
You should iterate as was said
Please make sure you have read and followed the release notes: https://github.com/immich-app/immich/discussions?discussions_q=label%3Achangelog%3Abreaking-change+sort%3Adate_created
This link has all the breaking changes
Thanks for the useful link!!
I'll try pulling the github tag for each version.
Make sure to snap more backups as you go
We dont recommend the LXC script. I think its a bare metal install
So i wouldnt expect this to work
I'm using docker to step through the DB updates.
Sounds like I should avoid the LXC in any case ?
Docker in LXC isnt ideal but better than the LXC script
Damn, fair enough!
I'll get to installing it in a Docker LXC
Until then here's the migration process I followed incase it helps others (or prompts others to suggest a better methodology)
Do you first backup ... seems like a good idea to encode the version number in the backup for future reference
You can check your backup had the correct parameters by inspecting the output with
gunzip -c v1.106.1.sql.gz | head -20
You should see -- PostgreSQL database cluster dump
Run this to discover the breaking versions:
Mine were:
- v1.106.1
- v1.113.0
- v1.118.0
- v1.133.0
- v1.136.0
- v1.137.0
- v1.138.0
Repeat the following for each version you need to go through
I'm executing all of these commands from the ./docker
directory in the repo
Wait for migration to complete Visit http://localhost:2283 and ensure it still works
then ctrl+c