高效导出旧日志

Exporting old logs efficiently

作为云迁移工作的一部分,为了建立旧日志的存档,我想从 Stackdriver 导出所有现有日志。

我知道可以通过 entries.list as noted in the documentation:

导出旧日志

Use the entries.list API method to retrieve your older log entries and use the destination service's API to write the log entries to the export destination.

看来 gcloud logging read 完全依赖于此调用,因此我可以通过以下命令提取所有日志:

gcloud logging read "logName=projects/my-project/logs/my-entity" --order asc | pv > production-my-entity.logs

但是,这超级慢

有没有办法更快地下载旧日志,比如批量下载或其他?

我认为目前没有适合您的工具,并且此功能仅可用于将日志存储在 Cloud Storage, BigQuery, or Cloud Pub/Sub. You can open a feature request in this link: