📚 Encyclopedia

Tools & Workflow · updated 2026-10-13

Exporting Google Photos with Takeout and restoring metadata with ExifTool

google-takeoutgoogle-photosexiftoolexifmetadatabackupobject-storage

Google Takeout is the only bulk way out of Google Photos, and what it gives you is not quite your photos: dates, GPS and descriptions are split off into JSON sidecar files. This is what was learned setting up an export-and-merge pipeline in August 2026, and why the destination was object storage rather than another Google product.

Export

Merging sidecars back into the files

Use ExifTool (a user-directory install works without root; the exiftool.org tarball URL 404'd once, the GitHub tag tarball worked). Takeout quirks the merge must handle: - Sidecars are named <file>.supplemental-metadata.json and are sometimes truncated (the name is cut at a length limit), so match by prefix, not exact name. - Duplicate names put the counter in an odd place: IMG.jpg(1).json belongs to IMG(1).jpg. - -edited copies usually have no sidecar; take metadata from the original. - geoData of 0.0, 0.0 means "no location". Do not write GPS 0,0 (a point in the Gulf of Guinea). - Write photoTakenTime into the EXIF date fields; Takeout file mtimes are the export date.

Where to keep the library

Linode object storage was chosen over Google Drive even though Drive was a few dollars a month cheaper at 400 GB: Drive needs interactive OAuth and was flaky from headless runs, a chat-tool connector is the wrong tool for bulk binary transfer, S3 is scriptable from bash with the existing SigV4 client, and Google has a record of cutting API access (the Photos API changes of 2025). See Linode (Akamai) Object Storage.

Automation notes

A cron-driven watcher (every 2 hours) can check Gmail for the Takeout email via a headless agent with a mail connector, notify the user to download, then extract and hand the merge to a headless session once files settle. Mail connectors can drop mid-session in headless runs, so treat "no access" as retryable and warn only after several in a row. Give such a watcher an expiry (it retired itself after 14 days) and make it remove its own crontab line when done.

See also

Sources: tldr memory (infra-takeout-photo-pipeline), post #1604