7be7d32d58c758d996486aeb5625027dbb85650a
Immich to cloud exporter
Script to export immich data as a structured folder. Useful if you want to browse your albums etc when immich is broken.
To-do
- Create folders like "Misc {{year}}" for photos that are not in albums
- Move (or rename?) photos that are deleted in Immich but exist on the local disk
- Dockerize the tool so it's easy to run on the server
- Stretch: Preserve metadata (e.g. file creation times)
- Stretch: directly sync to Proton Drive (skipping the local filesystem)
Usage
Docker
You can build and run this tool using Docker:
# Build the Docker image
docker build -t immich-to-cloud-exporter .
# Run the container
docker run -it --rm \
-e IMMICH_HOST=http://your-immich-server:2283/api \
-e IMMICH_API_KEY=your_api_key \
-v /path/to/local/export:/app/export \
immich-to-cloud-exporter
To run with the dry-run flag:
docker run --rm \
-e IMMICH_HOST=http://your-immich-server:2283/api \
-e IMMICH_API_KEY=your_api_key \
-v /path/to/local/export:/app/export \
immich-to-cloud-exporter --dry-run
Development
Generate OpenAPI spec
rm -rf generated/immich
docker run --rm \
-u $UID:$UID \
-v ${PWD}:/local openapitools/openapi-generator-cli generate \
-i https://github.com/immich-app/immich/raw/refs/heads/main/open-api/immich-openapi-specs.json \
-g python \
--skip-operation-example \
--additional-properties generateSourceCodeOnly=true,packageName="generated.immich.openapi_client" \
-o /local/
Description
Script to export immich data as a structured folder. Useful if you want to browse your albums etc when immich is broken.
Languages
Python
100%