Remove unused snapshot?

 

snapshotid=(
snap-xxxxxxxxxxxxxxxx
snap-xxxxxxxxxxxxxxxx
snap-xxxxxxxxxxxxxxxx
snap-xxxxxxxxxxxxxxxx
)
COUNTER=0
for (( i=0; i<${#snapshotid[@]}; i++ ));
do
  COUNTER=$((COUNTER+1))
     echo "++++";
         echo $COUNTER". Removing the Snapshot with the Snapshot ID: " ${snapshotid[$i]};
              aws ec2 delete-snapshot --snapshot-id ${snapshotid[$i]};
   done

Comments

Popular posts from this blog

Logical volume vmxxxx_img is used by another device - Error on LVM removal

Open VZ cheat Sheet

Cheat sheet for Hardware RAID health check - Megaraid, Adaptec, 3wareraid and HPraid.