I am a G Suite admin for a nonprofit, and just discovered the Data Export feature, which seems to be like an individual account's Takeout.
The export files were prepared, and are now available to download from a bucket in Google Cloud Platform Storage. However, there are many, many folders and trying to go in and out of each one to download the many, many .zip files in each sounds like a major headache to track.
I use Transmit on my Mac, and it has the ability to connect to Google Cloud Storage through the interoperability with Amazon S3. However, when I connect I see nothing (as I don't otherwise use Google Cloud Storage). I cannot find a way to connect to the particular bucket that our Takeout data is in. Suggestions?
After speaking with support (who told me there's no other way of downloading files besides the browser; I informed them that this feature is therefore basically worthless) I kept digging.
The gsutil
that Google offers holds the key! After installing it (just it, not the full SDK: https://cloud.google.com/storage/docs/gsutil_install), I was able to initialize it to be able to access my account, put in the gs:// address that the Bucket provided, and use rsync
(https://cloud.google.com/storage/docs/gsutil/commands/rsync) to download it all. Otherwise I would have had to go in and out of 50 directories—and every .zip file was NAMED IDENTICALLY save for a '01' or '02' at the end. A nightmare for a routine activity.
Building on repertor's great insight, here are exact steps I took (on a fedora system) to programatically download my gsuite takeout from the bucket:
# wget https://storage.googleapis.com/pub/gsutil.tar.gz
# tar xvfz gsutil.tar.gz
# cd gsutil
To create a read-only token, use the command below: visit the browser to get an API token, then paste the API token back into the terminal. Later it asks for a "project-id", which can be any string apparently.
# ./gsutil config -r
Go to G Suite Customer Takeout, click on "Access Archive" and find the bucket id. In my case, this ID has the form takeout-export-123456abcdef-123456abcedf
To download the entire bucket recursively with rsync:
# ./gsutil rsync -r gs://takeout-export-123456abcdef-123456abcedf /tmp/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With