🗂

AWS Backup

に公開

はじめに

個人の備忘録です

AWS Backup

  • フルマネージドなバックアップサービスで、バックアップを一元管理できる

  • クロスアカウント管理

    • AWS Organizationと統合
    • コンソールの[設定]で確認できる
    • アカウントを跨いだ管理できるが、マスターアカウントの権限が必要な
    • バックアップポリシー
    • クラスアカウントモニタリング
  • サービスのオプトイン

    • EFS
    • DynamoDB
    • EC2
    • EBS
    • RDS
    • Aurora
    • Storage Gateway 等
  • バックアップボールド

    • バックアップを整理するためのコンテナ = AMIやスナップショットをまとめて管理するところ
  • 復旧ポイント

    • 個々のバックアップは復旧ポイントという単位で管理
    • 各サービスのバックアップと1対1でひもづく
  • アクセスポリシー

    • バックアップボールドにはアクセスポリシーが設定できる
    • 特定のリソースのみ参照権付与
  • バックアッププラン

    • どのリソースをいつどのようにバックアップするかを定義
    • これによりバックアップジョブが定義・実行され、バックアップボールド内に復旧ポイントが作成
  • バックアップルール

    • バックアップ頻度
    • ライフサイクル
    • バックアップボールド
    • コピー先リージョン
  • リソースの割り当て

    • どのリソースに対してバックアップを実行するか
    • IAMロール付与 (バックアップの取得や復元に使用されるロール)
    • 割り当て
      • リソースID指定 or タグ指定
  • AWSBackupServiecRolePolicyForBackup

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "dynamodb:DescribeTable",
                "dynamodb:CreateBackup"
            ],
            "Resource": "arn:aws:dynamodb:*:*:table/*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "dynamodb:DescribeBackup",
                "dynamodb:DeleteBackup"
            ],
            "Resource": "arn:aws:dynamodb:*:*:table/*/backup/*",
            "Effect": "Allow"
        },
        {
            "Effect": "Allow",
            "Action": [
                "rds:AddTagsToResource",
                "rds:ListTagsForResource",
                "rds:DescribeDBSnapshots",
                "rds:CreateDBSnapshot",
                "rds:CopyDBSnapshot",
                "rds:DescribeDBInstances"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "rds:DeleteDBSnapshot"
            ],
            "Resource": [
                "arn:aws:rds:*:*:snapshot:awsbackup:*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "storagegateway:CreateSnapshot",
                "storagegateway:ListTagsForResource"
            ],
            "Resource": "arn:aws:storagegateway:*:*:gateway/*/volume/*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "ec2:CreateTags",
                "ec2:DeleteSnapshot"
            ],
            "Resource": "arn:aws:ec2:*::snapshot/*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "ec2:DescribeSnapshots",
                "ec2:DescribeTags"
            ],
            "Resource": "*"
        },
        {
            "Action": [
                "elasticfilesystem:Backup",
                "elasticfilesystem:DescribeTags"
            ],
            "Resource": "arn:aws:elasticfilesystem:*:*:file-system/*",
            "Effect": "Allow"
        },
        {
            "Effect": "Allow",
            "Action": [
                "ec2:CreateSnapshot",
                "ec2:DeleteSnapshot",
                "ec2:DescribeVolumes",
                "ec2:DescribeSnapshots"
            ],
            "Resource": [
                "arn:aws:ec2:*::snapshot/*",
                "arn:aws:ec2:*:*:volume/*"
            ]
        },
        {
            "Action": "kms:DescribeKey",
            "Effect": "Allow",
            "Resource": "*"
        },
        {
            "Action": "kms:CreateGrant",
            "Effect": "Allow",
            "Resource": "*",
            "Condition": {
                "Bool": {
                    "kms:GrantIsForAWSResource": "true"
                }
            }
        },
        {
            "Action": [
                "tag:GetResources"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

  • Backup Gateway
    • AWSマネコンからOVA (Open Virtual Appliance)ファイルをダウンロードし、VMware仮想環境上に仮想アプライアンス(VM)としてデプロイ

EC2インスタンスのバックアップ

https://dev.classmethod.jp/articles/aws-backup-perfect-understand/

参考資料

https://pages.awscloud.com/rs/112-TZM-766/images/AWS-Black-Belt_2023_AWS-Backup-For-VMwareCloudOnAWS-DR_0228_v1.pdf

https://dev.classmethod.jp/articles/aws-backup-perfect-understand/

https://qiita.com/hamingcode/items/9674cc35b5e5b72781c3

Discussion