Pi died and failing to transfer to new device
Yesterday my PI died (lost /immich-app, .env docker-compose.yml and /postgres) so have plugged the mass storage drive into a new machine (not a PI) I have tried restoring an automatic backup using the guide on the docs (backup and restore), I have setup the .env file again to point at the drive but when I go to the web app, all come up with "Error loading image" and only shows this from January this year. Checking the logs it looks like it is searching for a different UUID (268b...) but the files saved on my drive are under 69121... so is coming up file not found. Where would I change this or is there a fix? New machine is a Dell Optiplex 7050 running Ubuntu 24.04.2 LTS, drive is mounted to the same directory as on the Pi, immich version 1.126.1
50 Replies
:wave: Hey @Joe.,
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.Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
Which directories did you all restore?
If you zoom in on an image or download it, can you see it then?
Not sure what you mean but I moved the same drive from the Pi to the new machine, mounted it on the same location as it was, pulled the two files, and restored the most recent backup from /upload/backups using the manual restore from https://immich.app/docs/administration/backup-and-restore/
no if I download it give the notification it is downloading but then nothing happens or zoom in its still the Error loading image
Anyone got any thoughts?
You haven’t shared much of anything at all about what you did, logs, anything
You need to include wayyy more info if you want us to know what’s going on
Directory structure of all relevant folders
Database restore output
The logs are above, my processes are in the original message
I have since tried changing the UUID from 69121xxx to 268b52xxx and i still get the same error

also the timeline only goes back to 27th Jan 2025
should be going back to about 2007
You can’t change the UUID
I see two different Postgres folders
it looks like in the logs its looking for a different UUID to the one its been stored
Most likely because you haven’t properly restored the database
It won’t just randomly change the UUID
I don't see any actual database output from the restore
You haven't included the actual command that you ran for the restore, you just pasted form the docs
we need to see the exact ones you ran
.
the first section in the message is what i ran
ok well there's tons of stuff wrong with that then
did you read the comments explaining to set the path for the dump to your location, and set DB_USERNAME ..?
/path/to/backup/dump.sql.gz
this would be set to the path to your backup
<DB_USERNAME>
this would be set to the DB_USERNAME from your env
You also need to uncomment the rm
line and point it to the existing DB_DATA_LOCATION (not the backup dumps)oh its not copied properly, just what I had copied from the site not what i actually ran, yes I have updated all of these
^
You haven’t updated it correctly because no restore actually took place based on the output you posted
There should be a ton of output from Postgres during a restore
example:
but way longer
any issues you see with this?

can you run
head -n 10 /mnt/4tb/Pictures...sql.gz
copy paste it from the command to make sure it's correct
can you also run ls -lh /mnt/4tb/Pictures..../backups
just fill in the ...1 sec
oh wait you'll have go do
gunzip < ...sql.gz | head
other way round but yeah
Weird
Try the restore one line at a time and try the docker exec again. Stop after that (don’t start the full stack)
Why did your DB get so much smaller on Feb 20?
thats when my pi died
the rest after are just the auto backups on the new machine
so everything up to the sleep from the docs?
Oh ok you’re using the bigger one
yep
done, container immich_postgres healthy
Now run the gunzip command but remove the docker exec part
Let’s see what it prints

thats the last bit
There’s no data in that backup. You used the 00038 file
thats the last 91M one
-rwxrwxrwx 1 root root 91M Feb 22 02:00 immich-db-backup-1740189600038.sql.gz
Try just gunzip with no sed I guess , also test an earlier backup please
what do you need from the output?

backup from 20th feb
How many lines is the full output?
365108
Huh. I thought it always dropped the Postgres database first
Ok try doing the full command from the docs and see what the output is
with exec or just sed?
With exec

looking promising
It would be good to see the full output uploaded
I don’t see any rows created
can i re-run or will have to rm the database?
You can’t re run but if you can scroll there should be some INSERT or COPY lines
Or you can start over

Oh yeah
Most likely you mis typed the file name when restoring from gunzip
Before
god damn dyslexia, its all back now 🙂
thank you
Tab autocomplete is your friend 🙂
Glad to hear it
when its those short ones like mnt i just type them, has often been my downfall lol