【问题标题】:rsync: How to transfer Ubuntu local file to Google Cloud Storage?rsync:如何将 Ubuntu 本地文件传输到 Google Cloud Storage?
【发布时间】:2018-08-07 20:45:41
【问题描述】:

我想我已经完成了 rsync 的设置,由在线文档提供,虽然我不确定我是否真的成功了。

如何使用 rsync 将 Ubuntu 本地文件传输到 Google Cloud Storage?

【问题讨论】:

    标签: ubuntu google-cloud-storage rsync


    【解决方案1】:

    从您的消息看来,您可能正在使用系统的rsync。如果您想将文件移动到 Google Cloud Storage,请使用 gsutil rsync。例如

    gsutil -m rsync -nr directory gs://your-bucket-name/
    

    -m 导致 rsync 上传文件in parallel。

    -n 使 rsync 以“试运行”模式运行,即仅输出将要复制或删除的内容,而无需实际进行任何复制/删除。

    -r 使目录、桶和桶子目录递归同步。

    【讨论】:

    • 谢谢!我做到了,它说Building synchronization state... Starting synchronization... Would copy file: ..... 那我该怎么办?我在我的 Google 存储空间中找不到这些文件。
    • 发帖人提到他提供的答案只是你可以做的一个例子。该特定示例没有复制任何内容,因为它是“试运行”。上面提供的链接中提供了完整的命令列表。如果您想实际复制这些文件,只需删除 -n 标志,然后基本上运行以下命令: gsutil -m rsync -r directory gs://your-bucket-name/
    • 谢谢!!成功!对你有好处!
    猜你喜欢
    • 2014-09-18
    • 2018-02-27
    • 1970-01-01
    • 2016-02-03
    • 2018-12-23
    • 1970-01-01
    • 2019-09-14
    • 2018-05-04
    • 1970-01-01
    相关资源
    最近更新 更多