2016-11-23 2 views
1

나는 지난 15 분 동안 exclude=을 얻는 방법을 알아 내려고 노력했다.AWS s3cmd "제외"가 작동하지 않습니까?

static/ 폴더를 모두 static/js 폴더를 제외하고 s3에 업로드하고 싶습니다.

나는 다음과 같은 시도 :

  • s3cmd sync --exclude static/js --cf-invalidate static/ s3://mybucket/static/
  • s3cmd sync --exclude /static/js --cf-invalidate static/ s3://mybucket/static/
  • s3cmd sync --exclude=static/js --cf-invalidate static/ s3://mybucket/static/
  • s3cmd sync --exclude=/static/js --cf-invalidate static/ s3://mybucket/static/

그러나 그들 중 누구도 작동하지 않습니다. 어떤 아이디어?

답변

0

요즘 s3cmd 대신 AWS Command-Line Interface (CLI)을 사용하는 것이 좋습니다.

aws s3 sync 명령에 대한 자세한 내용은

, 참조 : 필터링 규칙에 대한 AWS CLI S3 sync

, 참조 : Use of Exclude and Include Filters

+1

네,하고 싶습니다. 그러나'aws s3 sync'에는 현재 클라우드 프론트 캐시를 무효화 할 수있는 플래그가 없습니다. – Sparrowcide

+0

수정하십시오. ['aws cloudfront create-invalidation'] (http://docs.aws.amazon.com/cli/latest/reference/cloudfront/create-invalidation.html)을 호출해야합니다. –

0

을 그래서 내 로컬 디렉토리가 정적 인 경우/다음 패턴은 정적 포함 할 필요가 없습니다 제외 밝혀 ...

관련 문제