Backup-Selection does not exclude volumes from ec2 Instances

0

I want to backup all my EC2-Instances with a Backup-Plan expect one large Volume used for often-changed temporary data. Because of that I want to exclude this disks from snapshots being made from my EC2-Instances. I have added a backup-selection like this:

{
  "BackupPlanId":"5678",
  "BackupSelection":{
    "SelectionName":"resources-list-selection", 
    "IamRoleArn":"arn:aws:iam::1234:role/service-role/AWSBackupDefaultServiceRole",
    "Resources":[
      "arn:aws:ec2:*:*:instance/*"
    ],
    "NotResources":[
        "arn:aws:ec2:eu-central-1:1234:volume/vol-343092438cskajb"
    ]
  }
}
UG
已提問 6 個月前檢視次數 372 次
1 個回答
0

NotResouce statement for EBS volume doesn't do anything as your plan includes only EC2 instances (but no EBS volumes). It would feel logical that volumes from instances would be inherited to the plan but that is not how this works. If you would change Resources to be all EBS volumes then you would get snapshot all but that single volume. But then you would loose the information what volumes are attached to what instance :-(

If you would think how excluding volumes from instances would work, it isn't without problems. If you don't include some volumes, would instance be able to start when volume is missing but still present in OS configuration?

Not sure how large your temp volume is, but sometimes it could be just easier to accept extra backup. Other option would be using instance type with instance store volume(s). Instance store is not included in backup.

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-store-volumes.html

profile picture
專家
Kallu
已回答 6 個月前
profile pictureAWS
專家
已審閱 6 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南