I’m not sure if I’m doing this right, but I’m trying to restore by Immich database in a new Dataset. I’ve tried using gunzip in shell but I don’t know what to enter for the username when I try to launch postgres. I’ve tried a few things it might be but I’m afraid it wants the userid number created when I set up the app the first time and I don’t know how to get that nor do I remember what it was. Also, is gunzip the best way to restore the database in the first place? The documentation seems to be pretty sparse on actually using the back up files.
For the record I am a complete newb when it comes to TrueNAS and my Linux proficiency is low.
Theoretically you can follow the guideline here → Backup and Restore | Immich
The dump need to be in a location your current immich instance has access to within the docker container.
Let me know if this helps otherwise i can provide a more detailled instruction
Hi @MRi
I thought I’d jump in on my current experience, not working 100% yet so working on a more organized and documented process - hoping to find a solution.
Background
Original system
ix System Mini XL+
immich from community
immich dataset with appropriate (new) folder structure
ZFS snapshots
New system
ix Systems Mini+
ZFS replication
immich from community
Everything was right, login, photos, etc. Changed my nginx proxy manager to point to the new sever, all good. Oddly though, it would always show the server status as offline/unknown.
However upon a restart and container start up, was stuck in deploy.
Looked at various logs for each container, postgres was not happy.
Decided to remove all data and start new just to verify a few things, brand new everything on the new server. Immich still showed the server as offline but it was working - odd right?!
NEXT STEPS to try
Old server is still working so no harm there. Decided to follow the immich backup/restore process, that is where I am now. Though there is no way I can see to just start the postgress container. Anyway my thoughts on what I am going to do.
OLD TrueNAS box
- database dump job from inside immich
- verify backup in the immich/data/backups folder
- stop immich container
- allow ZFS snapshot to occur
NEW TrueNAS box
5) allow ZFS replication to occur
6) verify permissions on dataset and folders
7) create new immich apps instance pointing to existing data
8) start immich app
9) check to see where things are
10) unknown here - depends on #9. Thinking I may have to drop into the postgres container and follow the restore process from the immich documentation.
If anyone has any other advice let me know.
John
Hi @JohnCahill,
i even accidently deleted my “good” immich app instead of my restore test. no harm done as long as you have the assets.
I put together an article check on bulletpoint 4.) Restore of Postgres, hopefully this is of any use for you. Please let me know
that’s for that guide, worked perfectly fine. I am still seeing this, not sure why:
Server Offline
Unknown
Next to observe the app on my iPhone and what is remembers or if I’ll have duplicates. “FUN” right?
In the mean time I am also looking at a SMB share accessing from Files on the iPhone and using Parachute Mobile app for backup of raw images.
Thanks again!
John
in theory there shouldnt be any duplicates. as for the server offline…where do youi see that? Is the App up&running or restarting/redeplyoing? you may want to click on the server container and read the logs which may reveal some information eg. missing .immich files or else