All relevant files are stored in your UPLOAD_LOCATION which you defined in your .env file (if you deployed immich via Docker Compose). The files you absolutely need to back up are in:
- UPLOAD_LOCATION/upload ← Contains your images
- UPLOAD_LOCATION/backups ← Contains your postgres dumps
You should also back up these two directories:
- UPLOAD_LOCATION/library
- UPLOAD_LOCATION/profile
They're not strictly necessary, but it makes it easier to restore the same setup.