Created
October 17, 2023 01:55
-
-
Save srkiNZ84/f4ad8bee7a0759bada85de7013373feb to your computer and use it in GitHub Desktop.
Revisions
-
srkiNZ84 created this gist
Oct 17, 2023 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ #!/bin/bash # Run: # aws backup list-recovery-points-by-backup-vault --backup-vault-name aft-controltower-backup-vault | jq --raw-output ".RecoveryPoints[].RecoveryPointArn" > /tmp/aft_recovery_point_arns.txt # first to get the list of recovery points to delete. Then run this script with the filename as the argument # e.g. # aft_delete_recovery_points.sh /tmp/aft_recovery_point_arns.txt while read -r line; do echo "deleting recovery point: $line" aws backup delete-recovery-point --backup-vault-name aft-controltower-backup-vault --recovery-point-arn "$line" done < "$1"