#author("2018-06-08T06:21:12+00:00","default:kazuma","kazuma")
#author("2018-09-19T02:30:38+00:00","default:kazuma","kazuma")
[[S3]]

*概要 [#p7966b24]
s3cmdではなくaws cliを使ったS3の操作方法をまとめます。

*共通 [#fad4f330]
*** プロファイルの場所 [#s7c9f52c]
 $HOME/.aws/ファイル

*** ドライラン [#rdca1039]
 --dryrun 

*bucket操作 [#i15755b7]
*** bucket一覧を確認 [#ucce952b]
 aws s3 ls

*コピー [#ma65fe59]
*** 特定ディレクトリ配下のファイルをコピー [#wfff6971]
 $ aws --profile プロファイル名 s3 cp s3://バケット名/パス/ . --recursive --exclude "*" --include "*20180425*"
 $ aws s3 cp s3://バケット名/パス/ . --recursive --exclude "*" --include "*20180425*"


*同期 [#q8b75a4c]
*** バケット内のデータすべてを別のバケットへ同期 [#s08f9df0]
 aws --profile testprofile s3 sync s3://test001-snapshot/ s3://test002-snapshot/
 aws s3 sync s3://test001-snapshot/ s3://test002-snapshot/

~~

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS