LoginSignup
3
2

More than 5 years have passed since last update.

s3cmd コマンドでフォルダを一括ダウンロード

Last updated at Posted at 2017-04-04

s3cmdをインストール

$ brew install s3cmd

初期設定

$ s3cmd --configure

Access Key  S3のアクセスキー指定
Secret Key  S3のシークレットアクセスキーを指定
Encryption password GPG encryptionを用いる事でデータを暗号化してくれる。(とりあえず空欄でおk)
Path to GPG program [/usr/bin/gpg]  GPGの場所を指定。(とりあえず空欄でおk)
Use HTTPS protocol [No] S3への通信をHTTPSにするか否か
HTTP Proxy server name  Proxyを使う場合はその指定

フォルダを一括ダウンロード

s3cmd get s3://バケット名/ --recursive
これで、バケット内のフォルダを一括ダウンロードできます。

知っておくといいかも

バケットの一覧確認

$ s3cmd ls

カレントディレクトリ直下のフォルダを丸ごと同期する

$ s3cmd sync . s3://BUCKETNAME/

参考にさせていただいたサイト
http://qiita.com/katsukii/items/73051b3f4c73040e834d
https://www.faq.idcf.jp/app/answers/detail/a_id/360/~/s3cmdのコマンド一覧

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2