iPhone Media Archive
Overview
Use this skill for backup-first iPhone media archive work where the durable deliverable is a raw Finder-browsable photo/video folder on an external drive.
Never delete media from the phone until a raw archive has been verified and the user gives a separate explicit cleanup go/no-go.
Workflow
- Confirm the external drive is mounted, writable, and has enough free space.
- Diagnose any existing archive folders before writing into them.
- Create or verify a pre-cleanup iPhone backup on the external drive. Prefer direct
idevicebackup2 backup <external-destination>when Mac internal storage is tight. - Verify backup finalization before using it:
Status.plistexists and hasSnapshotState=finished.Manifest.plistis a valid plist.Manifest.dbopens read-only with SQLite immutable mode andPRAGMA quick_checkreturnsok.
- Build a raw media plan from
Manifest.dbplus backed-upMedia/PhotoData/Photos.sqlite.- Use only raw
Media/DCIM/...backup files for the Finder-browsable archive. - Use
Photos.sqliteZASSET.ZDATECREATEDmapped byZDIRECTORY+ZFILENAMEfor capture-date ordering. - Use same-stem matching for Live Photo MOV files and AAE sidecars.
- Treat backup file mtimes as weak fallback evidence, not capture dates.
- Use only raw
- Run a dry-run extraction report before copying.
- Copy selected older media to a new date-organized archive folder on the external drive.
- Verify count, size, extension distribution, capture-date range, and sample still/video decodability.
- Stop for user cleanup approval. Do not clear Recently Deleted unless the user explicitly asks after verification.
Scripts
Use bundled scripts from scripts/:
verify-iphone-backup-manifest.sh <backup-root> [out-dir]- Read-only backup integrity and media manifest summary.
- Uses SQLite immutable mode for ExFAT/removable-drive compatibility.
extract-iphone-backup-media.py --backup-root <backup-root> --dest-root <archive-root> [--older-fraction 0.80|--cutoff-date YYYY-MM-DD] [--execute] [--report <path>]- Without
--execute, writes a dry-run TSV and copies nothing. - With
--execute, copies selected raw files intoYYYY/YYYY-MM-DD/folders.
- Without
verify-raw-archive.sh <archive-root> [out-dir]- Summarizes count, size, extensions, and sample file probes with
file,sips, andffprobewhen available.
- Summarizes count, size, extensions, and sample file probes with
Safety Rules
- Keep backups and archives on the external drive when internal disk space is low.
- Do not reformat or repartition an external drive unless the user explicitly asks.
- Do not rely on Photos libraries on ExFAT as the primary archive. Raw files are the durable deliverable.
- Ask the user only for unavoidable manual prompts: iPhone unlock/trust, backup password, macOS privacy access, or explicit cleanup confirmation.
- Save logs, reports, and one-off scripts into the active task folder so the archive can be audited later.