Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backup Recovery Point deletion - should automatically filter where can't delete #364

Open
mdgm88 opened this issue Oct 3, 2024 · 6 comments

Comments

@mdgm88
Copy link

mdgm88 commented Oct 3, 2024

You can't use EC2Image, EC2Snapshot, RDSClusterSnapshot and RDSSnapshot to delete recovery points in a Backup Vault. Instead you use AWSBackupRecoveryPoint to delete these.

There may be more to exclude for backups of other resources that are not fully managed by AWS Backup.

Currently I have these filters:
`
EC2Image:

  • property: "tag:aws:backup:source-resource"
    type: glob
    value: "*"
    EC2Snapshot:
  • property: "tag:aws:backup:source-resource"
    type: glob
    value: "*"
    RDSClusterSnapshot:
  • property: "Identifier"
    type: glob
    value: "awsbackup*"
    RDSSnapshot:
  • property: "Identifier"
    type: glob
    value: "awsbackup*"
    `
@mdgm88 mdgm88 changed the title Backup Recovery Point deletion Backup Recovery Point deletion - should automatically filter where can't delete Oct 3, 2024
@ekristen
Copy link
Owner

ekristen commented Oct 3, 2024

Not sure I follow 100%. Are you saying that EC2Snapshot/RDSSnapshot can be be seen by their respective apis even though they are managed by the AWS Backup service?

@mdgm88
Copy link
Author

mdgm88 commented Oct 3, 2024

Yes. They are not fully managed by AWS Backup, so the backups still show up in the EC2/RDS APIs.

Only some resource support for full management, and even for those that do, it is optional in some cases (e.g. for DynamoDB), so as to not force a breaking change: https://docs.aws.amazon.com/aws-backup/latest/devguide/backup-feature-availability.html#features-for-all-resources

@ekristen
Copy link
Owner

ekristen commented Oct 3, 2024

Is the tag data the only way of detection that you know of? I'm going to have to get some examples or figure out how to replicate. Any details there would be appreciated

@mdgm88
Copy link
Author

mdgm88 commented Oct 3, 2024

Tags are not the only way except for EC2Snapshot.

For EC2Image the Name begins with "AwsBackup_i-"
For RDSClusterSnapshot and RDSSnapshot the Identifier begins with "awsbackup:" and the SnapshotType is "awsbackup"

For EC2Snapshot it seems the tag is the only way currently, but perhaps that resource is missing some properties?

@ekristen
Copy link
Owner

ekristen commented Oct 3, 2024

Very helpful.

@mdgm88
Copy link
Author

mdgm88 commented Oct 3, 2024

Note that the tags with the prefix "aws:" are AWS owned tags and managed by AWS. So users can't tag something as being an AWS Backup that isn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants