LoginSignup
0
0

More than 3 years have passed since last update.

AWS S3 MacローカルディレクトリのファイルをS3に差分同期する

Posted at

目的

  • AWSのS3の任意のバケットにMacローカルのディレクトリの差分だけを同期する方法をまとめる

実施環境

  • ハードウェア環境
項目 情報
OS macOS Catalina(10.15.5)
ハードウェア MacBook Pro (13-inch, 2020, Four Thunderbolt 3 ports)
プロセッサ 2 GHz クアッドコアIntel Core i5
メモリ 32 GB 3733 MHz LPDDR4
グラフィックス Intel Iris Plus Graphics 1536 MB

前提条件

詳細

  1. 下記コマンドを実行してMacのローカルにディレクトリを作成する。

    $ mkdir ~/test01
    
  2. 下記コマンドを実行してMacのローカルにテキストファイルを作成する。

    $ touch ~/test01/text01.txt
    
  3. 下記コマンドを実行して既存のバケットのtest01ディレクトリにtext01.txtを同期する。

    $ aws s3 sync ~/test01 s3://同期先のバケット名/test01
    
  4. 下記コマンドを実行してMacのローカルにtext02.txtを作成する。

    $ touch ~/test01/text02.txt
    
  5. 下記コマンドを実行して差分ファイルであるtest02.txtを既存のバケットのtest01ディレクトリにアップロードする。

    $ aws s3 sync ~/test01 s3://同期先のバケット名/test01
    
0
0
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
0
0