15

I am trying to download my 35GB Google Takeout .tgz file but it keeps failing part way through.

  • On Chrome I might get about 3 GB progress, then it reports Failed - Network error. I have tried several times.

partial and failed attempts

  • On Firefox, I manged about 75% of the file downloaded on the one attempt.

My internet is pretty stable and I haven't had problems downloading relatively large ISO images, but I couldn't be sure that my connection would be 100% glitch free for the 3 hours it takes to download.

I'm considering generating a .ZIP takeout instead, but then I have to manually download lots of 2GB zips.

Got any better ideas?

3 Answers 3

5

If you are familiar with linux/unix then there is a simpler method using wget/curl.

Steps:

  • Initiate download via takeout page in your browser
  • Go to "Window->Downloads"
  • Locate the download which is in-progress right now
  • Right click + Copy link address
  • From your terminal - wget {url}

wget is more stable. you can manually set timeouts.

Bonus: you can initiate this from a remote server. I have seen speeds upto 250 MBps from remote servers. Just be sure not to cancel the browser download before your wget finishes.

10
  • Thanks! As of 04/2022 this still works. :) I would recommend using screen if you are using wget on a remote server through ssh.
    – daco
    Commented Apr 2, 2022 at 8:47
  • I would also add the use of wget this way wget -O customname "url" as wget, in my case, did not use the file name and just part of the url as the filename (which makes it hard to identify which file is which).
    – daco
    Commented Apr 2, 2022 at 8:52
  • Thanks for this idea. What makes you believe that wget is more stable than a browser? I'm hopeful you're right, because my Google Takeout downloads in Brave keep failing, and then Google annoyingly expires the entire export after a certain number of attempts. Also, what is the benefit of setting timeouts, and what would you recommend? Thanks. @daco thanks for the suggestion because wget wasn't working when I just supplied the (really long) URL. I didn't realize that you meant "customname" as a placeholder, so I think my file is being saved as "customname".
    – Ryan
    Commented May 16, 2022 at 22:06
  • And would retries be a useful option? unix.stackexchange.com/a/227666/48973
    – Ryan
    Commented May 16, 2022 at 22:07
  • 1
    @Ryan I’m happy it worked for you. If you saved your file as “customname”, you just have to rename it to the name you want plus the right extension. For example if you chose a zip file as the export option, rename “customfile” to “newName.zip”. With screen and whet on a computer which was always in (No suspend options in energize settings) and connected to internet by cable (not by wifi) I downloaded around 170gb without problem. I tried the same using Firefox and safari on a MacBook and a Linux laptop without success.
    – daco
    Commented May 16, 2022 at 22:16
2

Unfortunately, Daco's method above didn't work for me; however, this variant did:

Initiate the takeout page download in your browser, then open the page with "Inspect" to get the developer tools. (I used Firefox, but the same should work in Chrome.)

Pause the download, and then in the developer tools look at the requests in the "Network" tab to identify the request that's to takeout-download.usercontent.google.com. Right-click on that and choose "Copy Value->Copy as cURL (Posix)".

In a terminal window where you've ssh'ed into wherever you want to download (probably running inside screen), paste the command line and add a -O (dash capital O) at the end of the command. (That -O is to get the command to actually save the result to a local file rather than spit it onto stdout.)

1

Use aria2c!

  1. Open up the Developer Tools, then click the download link.
  2. View the Network tab and identify the request, likely it will come from a googleapis.com subdomain.
  3. Right click the request and Copy request location.
  4. Click on the Headers tab and in the Request Headers section, locate the line beginning with Cookie:.
  5. Combine all of the information you now have into a download command with aria2 like so:

    aria2c -o export.mbox -c --header="Cookie: AUTH_e2e0q...etc" long-request-url-goes-here

Source: https://kylekelly.com/posts/2014/12/04/google-takeout-with-aria.html

Not the answer you're looking for? Browse other questions tagged or ask your own question.