Replies: 3 comments 3 replies
|
Welcome @Inderix 😄 You're not the first one to ask for a guide related to this, since starting over can be painful if you're coming over from Docker. Before the helper-script was out, I had a patchwork LXC of Immich that I had cobbled together, and I wanted to switch to the script version while restoring the DB and using the Immich library I already had. But while I believe I did the DB restore just fine, I couldn't get the new Immich to see the library, and I eventually gave up and exported all the photos from the old library and re-uploaded them to the new. I believe what you want to do is possible, I just haven't ventured to try again lately, especially since simply keeping up with the script changes takes up so much time as it is. It is something I plan to tackle eventually, though. If anyone out there has already managed this, they are more than welcome to create a guide for it! |
|
Found this project: https://github.com/epichfallen/ImmichSafe don’t have time to check it out right now, anyone want to take a look? |
|
I successfully migrated Immich from a Docker install to an LXC container. Here’s the roughly process that worked: 1. Prepare the LXC
pct stop 103 # replace 103 with your CT ID2. Copy the upload libraryMount the LXC filesystem on the Proxmox host: pct mount 103
# → mounted CT 103 in '/var/lib/lxc/103/rootfs'Copy the library (use cp -r /path/to/your/old/upload /var/lib/lxc/103/rootfs/opt/immich/upload
# or
rsync -avh --progress /path/to/your/old/upload/ /var/lib/lxc/103/rootfs/opt/immich/upload/Fix ownership so the LXC can access the files (this maps to the unprivileged user inside the container): chown -R 100000:100000 /var/lib/lxc/103/rootfs/opt/immich/upload
Unmount and start the container: pct unmount 103
pct start 1033. Fix ownership inside the LXCEnter the LXC console as root and run: chown -R immich:immich /opt/immich/upload(This step is also slow on big libraries.) 4. Recreate the missing PostgreSQL roleThe Docker install used a role that doesn’t exist by default in the LXC setup.
cat /opt/immich/.env | grep DB_PASSWORD
su - postgres -c psql
CREATE ROLE immiches WITH LOGIN PASSWORD 'YOUR_DB_PASSWORD';
ALTER ROLE immiches CREATEDB;
\q5. Import the database dump
Enjoy your restored Immich instance! |

Uh oh!
There was an error while loading. Please reload this page.
Hello, bit new with working with databases and seeking help with how exactly to handle this.
I'm moving data from a broken and now gone CasaOS system with Immich to a shiny new Proxmox-based setup. I managed to recover the
uploaddirectory from the old instance, but I'm a bit stuck on how to move it into the LXC correctly. I've combed over Immich's docs for this, but I'm a bit over my head on what I'm looking at here.I have a bunch of .gz files in
/upload/backupfrom the old instance as well, the latest one decompressed into a .sql file, I imagine this is a database dump. I've already created an LXC using the immich community script. To be clear I'd like to use the default/opt/immich/uploaddirectory, since the LXC is created on a very spacious drive, I just need a bit of a push in understanding postgres and how to perform the database import.As for posts similar to my issue:
I've read over #5075 however its not clear to me what applies to my situation.
#5384 - my LXC instance seems to be missing the "postgres" command, I am unsure how to work around that.
in short; i am stupid and lost :(
I'm humbly coming to this community in hopes for an "explain it like im 5" kind of approach to getting this move in complete, I have some command line experience, I promise, I was just terribly unprepared for what I'd be getting into with Docker and database management.
All reactions