If you have an Amazon Prime subscription you get unlimited photo storage in Amazon Photos.

If you don’t have a Google Drive subscription you get a 15GB storage limit for photos.

After a while you will hit the Google storage limit. If you don’t want to pay for a Google Drive subscription, you can do this to move everything.

  • Check you have about 30GB free on disk to do this comfortably
  • Request takeout from Google of all photos
  • Wait for Google to email a download link
  • Download archive
  • Inspect archive (takes several seconds to open in Ubuntu archive manager)
  • Extract archive

    • Don’t use the right-click and extract in Nautilus. It just creates an empty folder.
    • Use this command in the terminal: tar -xzf takeout-20210131T163243Z-001.tgz
  • Check that the size of the extracted folder is slightly more than the original archive (decompressed JSON metadata)
  • Open Amazon Photos in Firefox
  • Click “Add” then “Upload folder”
  • Try to upload the whole “Google Fotos” folder at once lol yolo
  • See upload counter “Uploading 8 of 18557…”
  • Wait for it to churn through them all!
  • Check the stats.

    • 9192 items uploaded
    • 9465 upload errors
    • Is that because of the JSON files or did some photos actually fail?
    • Install https://marketplace.visualstudio.com/items?itemName=mohd-akram.vscode-html-format
    • Inspect errors element of page <section class="error-list">
    • Copy outer HTML of element
    • Paste into VS Code and format
    • Filter to find any non-JSON errors. This works becuase VS Code formatting puts the span on the same line as the div.

      $ cat errors.html |grep "error-desc" | sort | uniq
            <div class="error-description"><a href="/photos/storage" class="over-quota-link"><span>Over quota</span></a>
            <div class="error-description"><span>Invalid file type</span></div>
    • The file name is on the line before. We can use context lines or we can use XPath.

      $ xmllint --xpath "//div[@class='error']" errors.html
  • Create a new album to add them to
  • Namne album Google Photos
  • Save
  • Done!