Created
April 22, 2020 10:50
-
-
Save grrywlsn/250cdfa3d1233e3e8404744d345c98db to your computer and use it in GitHub Desktop.
Delete all AWS backups from a vault
This file contains 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
#!/bin/bash | |
while [[ backup ]] ; do | |
backup=`aws backup list-recovery-points-by-backup-vault --backup-vault-name @@@@ --max-results 1 | jq -r ".RecoveryPoints[].RecoveryPointArn"` | |
echo "Deleting $backup..." | |
`aws backup delete-recovery-point --backup-vault-name @@@@ --recovery-point-arn $backup` | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment