Fellow self hosting friends, I screwed up. Not only have I deleted Immich's PostgreSQL folder but I also didn't have backups (of the database, of the photos I do).
I've tried to recover the deleted folder but there's not much left even with proper tools. I've checked and the photos are still there, so my question is: Is there a way for immich to rebuild the database with the photos there? Should I start from scratch and re-upload?
I am only a solo user that tried similar recovery.
There are several jobs in the admin section, one of them is "migrate the storage template" or something like this. I think that thing might do what you want. I would check that it is set properly depending on what you were using previously and rerun in.
https://immich.app/docs/administration/storage-template/
I also wanted to mention that normally Immich dumps its own db into a file backup file somewhere. I forgot where. Check the database dump backup cron job in the settings.
I also wanted to mention that normally Immich dumps its own db into a file backup file somewhere. I forgot where. Check the database dump backup cron job in the settings
Hi, thank you. This was the solution. Immich was storing its backup files to DB_UPLOAD (as defined on the .env) file. There will be a backup folder with a bunch of .sql.gz files) Picked one and ran the following command
I am aware and actually use this but it appears too restrictive for our needs.
The structure we were already using cannot be recreated.
Honestly i could live with the default. But my partner who is less into computers likes to make their own backups on external hard drives and uses shared network drives rather then the immich web viewer.