Created
January 11, 2023 13:42
-
-
Save ojacques/578cce2b77c868e2775f4f64de77a23a to your computer and use it in GitHub Desktop.
AWS delete backup recovery points earlier than a date
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VAULT=<your vault here> | |
for ARN in $(aws backup list-recovery-points-by-backup-vault --backup-vault-name "$VAULT" --query 'RecoveryPoints[].RecoveryPointArn' --output text --region eu-west-1 --by-created-before 1672580151); do | |
echo "deleting $ARN" | |
aws backup delete-recovery-point --recovery-point-arn $ARN --region eu-west-1 --backup-vault-name "$VAULT" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment