Files
argento/IMMICH-MIGRATION.md
T
2026-04-14 17:51:04 -04:00

3.0 KiB
Raw Blame History

Immich migration plan

One-time migration of photos from Nextcloud into Immich's native library.

  • Source: /opt/argento/docker/nextcloud/data/timothykim/files/Photos/ (338 GB, ~58k files)
  • Target: Immich native library on threeteras pool (/opt/argento/docker/immich/library/)
  • Tool: immich-go via Immich HTTP API
  • Expected wall time: ~1 day if videos are short clips, 23 days if significant long/4K video
crontab -e   # comment out scripts/backup.sh line

Re-enable after migration completes.

2. Install immich-go

mkdir -p /opt/argento/tools && cd /opt/argento/tools
wget https://github.com/simulot/immich-go/releases/latest/download/immich-go_Linux_x86_64.tar.gz
tar xzf immich-go_Linux_x86_64.tar.gz
./immich-go --version

3. Get an Immich API key

Immich UI -> Account Settings -> API Keys -> New (label it "migration"). Save the key.

4. Get the direct container IP (skips nginx/TLS overhead)

IMMICH_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}} {{end}}' immich_server | awk '{print $1}')
echo $IMMICH_IP

5. Dry-run on a small subfolder first

Pick one year or album:

./immich-go upload from-folder \
  --server http://$IMMICH_IP:2283 \
  --api-key <KEY> \
  --dry-run \
  /opt/argento/docker/nextcloud/data/timothykim/files/Photos/<small-subfolder>

6. Real run on that subfolder, verify in UI

Drop --dry-run, run, then in Immich check: dates, GPS, thumbnails, album assignment look correct.

7. Full migration in tmux

tmux new -s immich-migrate
./immich-go upload from-folder \
  --server http://$IMMICH_IP:2283 \
  --api-key <KEY> \
  --into-album-folder \
  /opt/argento/docker/nextcloud/data/timothykim/files/Photos/
# Ctrl-b d to detach; tmux attach -t immich-migrate to resume

Safe to Ctrl-C and re-run -- idempotent by file hash.

8. Wait for background jobs

Immich UI -> Administration -> Jobs. Watch these drain (can take hours to days):

  • Thumbnail Generation
  • Metadata Extraction
  • Smart Search (CUDA)
  • Face Detection + Recognition (CUDA)
  • Video Conversion (NVENC)

9. Verify counts

find /opt/argento/docker/nextcloud/data/timothykim/files/Photos/ -type f | wc -l
# Compare to Immich UI -> Administration -> Server Stats

If mismatch, re-run step 7 (will only upload the missing files).

10. Spot-check the library

Random samples across years, verify EXIF dates, GPS locations, faces grouping reasonably.

11. Clean up Nextcloud (only after you're satisfied)

Delete Photos/ from Nextcloud UI -> empty trashbin -> verify zfs list shows nextcloud/data shrank.

12. Re-enable backup cron

Uncomment the cron line, then run scripts/backup.sh manually once to get a fresh full backup with the new Immich library.

Rollback

If anything goes wrong before step 11, Nextcloud is untouched. Worst case: delete all Immich assets from UI (or wipe /opt/argento/docker/immich/library/ and reinit the DB), start over.