google to immich migration guide
πΈ Migrating Google Photos to Immich
A step-by-step guide for migrating your personal Google Photos archive (exported via Takeout) to a self-hosted Immich server, preserving photo metadata like EXIF, timestamps, location, and albums.
π§ Why This Guide?
When exporting photos from Google using Takeout, the result includes:
- JPEG/HEIC files
- Companion
.json
files with metadata (timestamps, location, etc.) - Loss of original timestamps if uploading naively
This guide ensures:
- Original timestamps are restored
- Metadata is injected into the images before uploading
- Files are uploaded cleanly to Immich
β Prerequisites
- Immich server is installed and accessible (with sufficient storage)
- Python 3.8+ installed on your local machine
- Google Takeout zip archive already extracted
- Immich CLI or web UI access
π Folder Structure After Extracting Takeout
Takeout/
βββ Google Photos/
β βββ IMG_20210101.jpg
β βββ IMG_20210101.json
β βββ Album - Vacation 2021/
β βββ ...
π Step 1: Install Dependencies
pip install piexif exifread pillow
π Step 2: Restore Timestamps and Metadata
Download restore_metadata.py
:
wget https://raw.githubusercontent.com/razzius/google-photos-exif/master/restore_metadata.py
Usage:
python restore_metadata.py /path/to/Google\ Photos
- The script scans all
.json
files and updates corresponding imagesβ EXIF with originalphotoTakenTime
. - It also updates file modification timestamps to match EXIF.
πΌ Step 3: Upload to Immich
Option 1: Web UI
- Upload directly using browser
- Immich auto-recognizes EXIF timestamps and organizes photos accordingly
Option 2: Immich CLI
npx @immich/cli upload -h https://your.domain -u your@email.com -p your_password /path/to/processed_photos
Make sure the upload path points to the modified folder that had metadata restored.
π Optional: Clean Up
- Remove
.json
files post-processing (optional):
find . -name "*.json" -type f -delete
π§ͺ Testing
- Check Immich Library view β ensure images show original date/time
- Inspect individual photo β Metadata tab should reflect expected values
π Notes
- The
restore_metadata.py
tool can be customized further - Always back up originals before processing
- EXIF editing is destructive (modifies files), so work on a copy
β Youβre Done!
Enjoy your fully migrated photo library with original metadata preserved β now fully yours on your self-hosted Immich instance.