Amazon S3 sync Deleting excluded files -


i have 2 buckets, bucket , bucket b. bucket contains javascript files , bucket b contains mix of javascript , other file types. trying sync of js files bucket b.

i using following:

aws s3 sync s3://bucket-a s3://bucket-b --delete --exclude "*" --include "*.js"

i assuming leave bucket b exact copy of of js files. above command start deleting of non js files in bucket b.

when run following command:

aws s3 sync . s3://bucket-b --delete --exclude "*" --include "*.js"

with current directory containing copy of bucket a, bucket b have same js files bucket , non js files not affected.

why command functioning differently when syncing local bucket compared bucket bucket?

edit: added cli input/output reproduce problem.

darrrens-mbp:testfolder darren$ aws --version aws-cli/1.7.4 python/2.7.9 darwin/14.4.0 darrrens-mbp:testfolder darren$ aws s3 ls s3://tmp-test-bucket-a 2015-09-01 11:40:44          2 test1.js 2015-09-01 11:40:43          2 test2.js darrrens-mbp:testfolder darren$ aws s3 ls s3://tmp-test-bucket-b 2015-09-01 11:39:32          2 test1.js 2015-09-01 11:39:34          2 test2.js 2015-09-01 11:39:34          3 test3.php darrrens-mbp:testfolder darren$ ls test1.js    test2.js darrrens-mbp:testfolder darren$ aws s3 sync . s3://tmp-test-bucket-b --delete --exclude "*" --include "*.js" darrrens-mbp:testfolder darren$ aws s3 sync s3://tmp-test-bucket-a s3://tmp-test-bucket-b --delete --exclude "*" --include "*.js" delete: s3://tmp-test-bucket-b/test3.php copy: s3://tmp-test-bucket-a/test2.js s3://tmp-test-bucket-b/test2.js copy: s3://tmp-test-bucket-a/test1.js s3://tmp-test-bucket-b/test1.js 


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -