14387 shaares
5333 private links
5333 private links
G Suite Customer Takeout: Bulk Download using Terminal
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:
Install gsutil standalone
wget https://storage.googleapis.com/pub/gsutil.tar.gz
# tar xvfz gsutil.tar.gz
# cd gsutil
Connect gsutil to G suite account
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
Actually download the backup
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/