centos의 이중성 s3 백업

centos의 이중성 s3 백업

서버 데이터를 S3에 백업하려고 하는데 성공하지 못했습니다. 다음은 S3에서 백업을 시작하기 위해 실행하는 스크립트입니다.

IAM을 사용하여 사용자를 생성하고 해당 사용자에게 모든 권한을 부여했습니다.

 #!/bin/bash

 export AWS_ACCESS_KEY_ID="access key goes here"
 export AWS_SECRET_ACCESS_KEY="secrete key goes here"
 export PASSPHRASE="passphrase goes here"
 duplicity --no-encryption demo/* s3+http://s3.amazonaws.com/[backet-name] &>>       backups.log
 AWS_ACCESS_KEY_ID=""
 AWS_SECRET_ACCESS_KEY=""
 PASSPHRASE=""

다음은 로그 출력입니다.

Import of duplicity.backends.dpbxbackend Failed: No module named dropbox
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: none
No signatures found, switching to full backup.
Failed to create bucket (attempt #1) 's3.amazonaws.com' failed (reason: S3ResponseError: S3ResponseError: 403 Forbidden)

답변1

사용자 권한을 조정해야 합니다.

옵션 1

S3 사용자에게 S3 전체 액세스 권한을 추가합니다.

  • IAM/사용자/권한 및정책 연결
  • "AmazonS3FullAccess" 정책 추가

옵션 2

사용자에게 맞춤 정책을 추가합니다.

버킷으로 이동속성그리고권한탭, 선택버킷 정책 추가그런 다음 이것을 복사하십시오 :

{
  "Statement": [
    {
      "Principal": {
          "AWS": "*"
      },
      "Effect": "Allow",
      "Action": "s3:*",
      "Resource": ["arn:aws:s3:::my-bucket-name/*", "arn:aws:s3:::my-bucket-name"]
    }
  ]
}

바꾸다내 버킷 이름당신의 것으로 다시 시도하십시오. 문제 없이 이중성 백업을 업로드할 수 있어야 합니다.

관련 정보