本文介绍了来自 G Suite 的 Google Takeout 从 Google Cloud Storage 下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一家非营利组织的 G Suite 管理员,刚刚发现了数据导出功能,这似乎是个人帐户的外卖.

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.

导出文件已准备好,现在可以从 Google Cloud Platform Storage 中的存储分区下载.但是,有很多很多文件夹,并且尝试进出每个文件夹以下载每个文件夹中的许多 .zip 文件听起来很头疼.

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.

我在我的 Mac 上使用 Transmit,它能够通过与 Amazon S3 的互操作性连接到 Google Cloud Storage.但是,当我连接时,我什么也看不到(因为我不使用谷歌云存储).我找不到连接到我们的外卖数据所在的特定存储桶的方法.建议?

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?

推荐答案

G Suite 客户外卖:使用终端批量下载

基于 repertor 的深刻见解,以下是我(在 Fedora 系统上)以编程方式从存储桶中下载我的 gsuite 外卖的具体步骤:

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:

# wget https://storage.googleapis.com/pub/gsutil.tar.gz
# tar xvfz gsutil.tar.gz
# cd gsutil

将 gsutil 连接到 G Suite 帐户

要创建只读令牌,请使用以下命令:访问浏览器以获取 API 令牌,然后将 API 令牌粘贴回终端.稍后它会要求一个project-id",显然可以是任何字符串.

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

实际下载备份

转到 G Suite 客户外卖,点击访问存档";并找到存储桶 ID.就我而言,此 ID 的格式为 takeout-export-123456abcdef-123456abcedf

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

使用 rsync 递归下载整个存储桶:

To download the entire bucket recursively with rsync:

# ./gsutil rsync -r gs://takeout-export-123456abcdef-123456abcedf /tmp/

这篇关于来自 G Suite 的 Google Takeout 从 Google Cloud Storage 下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 09:10