【问题标题】:Does sync s3 to s3 works in s3cmd version 1.1.0-beta3在 s3cmd 版本 1.1.0-beta3 中同步 s3 到 s3 是否有效
【发布时间】:2015-09-02 14:05:02
【问题描述】:

在 s3cmd 版本 1.1.0-beta3 中同步 s3 到 s3 是否有效?

# s3cmd --version
s3cmd version 1.1.0-beta3

出现以下错误:

# s3cmd sync --exclude 'reportTemplate/*' 'orders/*' 'customers/*' s3://xxx-storage-bucket-prod-env/ s3://xxxx-storage-bucket-test-env/

ERROR: Parameter problem: Expecting filename or directory instead of: s3://inksedge-app-file-storage-bucket-prod-env/

【问题讨论】:

  • 现在建议使用AWS Command-Line Interface (CLI) 而不是s3cmd。它还有一个aws s3 sync 命令。
  • @JohnRotenstein 的语法与 aws s3 syn 即 aws s3 sync --exclude 'reportTemplate/*' 'orders/*' 'customers/*' s3://xxx-storage-bucket- prod-env/s3://xxxx-storage-bucket-test-env/
  • $ aws s3 sync --exclude 'reportTemplate/*' 'orders/*' 'customers/*' s3://inksedge-app-file-storage-bucket-prod-env s3:/ /inksedge-app-file-storage-bucket-test-env 未知选项:s3://inksedge-app-file-storage-bucket-prod-env, s3://inksedge-app-file-storage-bucket-test -env fabricapp@Inksedge-Bastion-01:~/Fabric$ aws s3 sync s3://inksedge-app-file-storage-bucket-prod-env s3://inksedge-app-file-storage-bucket-test- env --exclude 'reportTemplate/*' 'orders/*' 'customers/*' 未知选项:orders/*, customers/*

标签: amazon-web-services amazon-s3 s3cmd


【解决方案1】:

AWS Command-Line Interface (CLI) 还可以对选定目录进行桶到桶的传输:

aws s3 sync s3://source-bucket s3://dest-bucket --exclude "*" --include "folder1/*" --include "folder2/*"

--exclude 参数表示不复制任何内容,而--include 参数则添加要复制的选定文件/路径。

见:AWS CLI S3 sync documentation

【讨论】:

    【解决方案2】:

    s3cmd 1.1.0-beta3 已知有许多错误,因为在 1.5.2 和更新版本中已修复。

    https://github.com/s3tools/s3cmd/wiki/Common-known-issues-and-their-solutions

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-04-30
      • 1970-01-01
      • 2021-07-14
      • 2020-08-20
      • 1970-01-01
      • 2013-01-14
      相关资源
      最近更新 更多