我正在尝试使用排除选项将数据从 ec2 同步到 s3 存储桶
root@ir:ls /data/
f1 f2 f3
root@ir:aws s3 sync /data/ s3://data/ --profile s3to --exclude "/data/f1/*"
root@ir:aws s3 sync /data/ s3://data/ --profile s3to --exclude "/data/f1/"
root@ir:aws s3 sync /data/ s3://data/ --profile s3to --exclude "/data/f1*"
root@ir:aws s3 sync /data/ s3://data/ --profile s3to --exclude "f1/*"
root@ir:aws --version
aws-cli/1.9.15 Python/2.7.6 Linux/3.13.0-48-generic botocore/1.3.15
但是以上选项都不起作用,f1 继续同步到 S3 存储桶。
最佳答案
你能试一下吗
aws s3 sync /data/ s3://data/ --profile s3to --exclude "*f1/*"
关于amazon-web-services - aws cli s3 同步,排除不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36791715/