Downloading a Google Takeout file with curl

I had to download a large (~60GB) Google Takeout file today; asking Google to split the file into chunks of 10GB resulted in this:

I tried to download the file twice in the browser; both times it completed and then vanished from my disk drive. Then I was told I couldn’t download it again. So I had to create an entirely new Takeout.

Needless to say, this was frustrating. Copying the URL and pasting it into wget or curl doesn’t work. There are a bunch of now seemingly useless blog posts and Stack Overflow posts that imply it should work, but I couldn’t get any of them to work.

After some mucking around, what did work for me, as of today’s date, was (in Chrome):

  1. Prepare the Takeout & go through it until you get to the ‘Download data’ image shown above.
  2. Start the download.
  3. Go to the downloads tab and copy the URL there.
  4. Stop the download.
  5. Go back to the Takeout page, open devtools, and refresh it.
  6. Find the first URL to load (the base page). It looked something like this for me:
    https://takeout.google.com/manage?user=xxxxxx&rapt=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  7. Right click that URL and ‘Copy cURL’ for your appropriate OS
  8. Paste that into a notepad or whatever and add a new line (don’t forget to add a new line marker at the end of the previous line – \ on Linux or ^ in Windows.
    -o All mail including Spam and Trash-002.mbox
  9. Paste that into your terminal/cmd/shell & run the curl command.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.